The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Purpose of SDL_GL* functions??
codeman


Joined: 05 Aug 2014
Posts: 1
I've been researching windowing APIs for quite some time recently. I would like to refer to the following:

SDL_GL_BindTexture
SDL_GL_CreateContext
SDL_GL_DeleteContext
SDL_GL_ExtensionSupported
SDL_GL_GetAttribute
SDL_GL_GetCurrentContext
SDL_GL_GetCurrentWindow
SDL_GL_GetDrawableSize
SDL_GL_GetProcAddress
SDL_GL_GetSwapInterval
SDL_GL_LoadLibrary
SDL_GL_MakeCurrent
SDL_GL_ResetAttributes
SDL_GL_SetAttribute
SDL_GL_SetSwapInterval
SDL_GL_SwapWindow
SDL_GL_UnbindTexture
SDL_GL_UnloadLibrary

and

SDL_GLattr
SDL_GLcontextFlag
SDL_GLprofile

I cannot find a succinct piece of documentation that explains the need for the previous functions and attributes AS A WHOLE. I understand why specific functions are needed (like SDL_GL_CreateContext), but not much beyond that. I'll quote from the following thread "https://forums.libsdl.org/viewtopic.php?t=9351&sid=4e7ebe3df4be87f0ee65a18a7a944738":

"The texture binding API was added for rare cases that I'll let other people explain. Smile "

However, the resulting reply didn't describe the situation fully IMO. From what I can gather, those functions are used to make SDL+OpenGL truly multi-platform. If that is the case, what is the downside to not using the above functions? For my purposes, I am just wanting a windowing and input API, leaving the rendering to OpenGL only - having all of the SDL_GL* functions makes things feel bloated to me. I do not want to be constrained by SDL when using it with OpenGL; I would like it to give me a window and then sort of leave me alone (haha). However, I am open to accepting the SDL_GL* functions if they truly do help me out.


TLDR: Basically, what I'm trying to ask is, what is the purpose of the SDL_GL* functions and attributes AS A WHOLE, and what am I missing by not using them?

Thanks everyone for any help!! Smile