Skip to content

Commit

Permalink
opengl: Don't try to do Desktop OpenGL stuff if support isn't available.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Apr 14, 2020
1 parent a96d8a4 commit 132f87c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video/SDL_egl.c
Expand Up @@ -975,9 +975,10 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface)
if (SDL_GL_ExtensionSupported("GL_OES_surfaceless_context")) {
_this->gl_allow_no_surface = SDL_TRUE;
}
#if SDL_VIDEO_OPENGL
} else {
/* Desktop OpenGL supports it by default from version 3.0 on. */
void (GL_APIENTRY * glGetIntegervFunc) (GLenum pname, GLint * params);
void (APIENTRY * glGetIntegervFunc) (GLenum pname, GLint * params);
glGetIntegervFunc = SDL_GL_GetProcAddress("glGetIntegerv");
if (glGetIntegervFunc) {
GLint v = 0;
Expand All @@ -986,6 +987,7 @@ SDL_EGL_CreateContext(_THIS, EGLSurface egl_surface)
_this->gl_allow_no_surface = SDL_TRUE;
}
}
#endif
}
}

Expand Down

0 comments on commit 132f87c

Please sign in to comment.