enable opengl es1

This commit is contained in:
sandstranger 2015-12-02 22:40:04 +03:00
parent 77965501d4
commit bd5057aa3c
8 changed files with 250 additions and 63 deletions

View file

@ -92,7 +92,13 @@ void GraphicsWindowSDL2::init()
// have to get the current one to be able to restore it afterward.
SDL_Window *oldWin = SDL_GL_GetCurrentWindow();
SDL_GLContext oldCtx = SDL_GL_GetCurrentContext();
#ifdef OPENGL_ES
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
#endif
mContext = SDL_GL_CreateContext(mWindow);
if(!mContext)
{