blackberry / SDL

Simple DirectMedia Layer is an open-source, cross-platform multimedia library designed to provide a low level API.
GNU Lesser General Public License v2.1
86 stars 46 forks source link

Added OpenGL ES 2 context support #44

Closed jgranick closed 11 years ago

jgranick commented 11 years ago

This should add the ability to create an OpenGL ES 2 context, similar to how it works on webOS, and (I believe) on SDL 2.

The extra attributes were pulled from the old SDL 1.3 working version, but I'm not sure if SDL 2 has officially changed how this works. Either way, this is consistent with how webOS handles it (since all webOS native applications rely upon SDL) and blends in well with the rest of SDL 1.2

I have left the default at OpenGL ES 1, but now you can use SDL_GL_SetAttribute (SDL_GL_CONTEXT_MAJOR_VERSION, 2); to increase to ES 2