By correct, I mean the way that will work across multiple devices, and give you OpenGL (ES) shaders.

SDL_Init( SDL_INIT_VIDEO );
 
#ifdef MOBILE    // Some #define of yours that says it's a mobile build. //
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
#endif // MOBILE //

If you don’t need shaders (i.e. OpenGL 1.x, OpenGL ES 1.1), a lone SDL_Init will suffice (default behavior).

SDL_Init( SDL_INIT_VIDEO );

If you are using SDL_GL_LoadLibrary, you *MUST* put the calls in the following order.

SDL_Init( SDL_INIT_VIDEO );

#ifdef MOBILE    // Some #define of yours that says it's a mobile build. //
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
#endif // MOBILE //

SDL_GL_LoadLibrary( NULL );

I had to do it this way (between these 2 calls), otherwise Android devices with PowerVR GPUs would not work (Nexus S, Intel powered devices, Kindle Fire?, etc).

That said, I’m actually not sure of the benefits of SDL_GL_LoadLibrary. Removing it from my code works just fine. The documentation suggests having to manually use SDL_GL_GetProcAddress as a result of SDL_GL_LoadLibrary, which doesn’t sound cool.

http://wiki.libsdl.org/SDL_GL_LoadLibrary

I’ve noticed I’ve never had to do this, but I am using an updated version of GLEE (haven’t switched to GLEW yet). Huh.

TL;DR: Don’t use SDL_GL_LoadLibrary.