Detect EXT_swap_control_tear on Windows

This commit is contained in:
Henrik Rydgard committed 2013-07-07 10:53:28 +02:00
1 parent 35ccbc6df3
commit 3fe24760e6
2 files changed
+8

No files matched your search

+7
View File
@@ -59,6 +59,13 @@ void CheckGLExtensions() {
const char *extString = (const char *)glGetString(GL_EXTENSIONS);
#ifdef WIN32
const char *wglString = wglGetExtensionsStringEXT();
gl_extensions.EXT_swap_control_tear = strstr(wglString, "WGL_EXT_swap_control_tear") != 0;
#elif !defined(USING_GLES2)
// const char *glXString = glXQueryExtensionString();
// gl_extensions.EXT_swap_control_tear = strstr(glXString, "GLX_EXT_swap_control_tear") != 0;
#endif
gl_extensions.OES_packed_depth_stencil = strstr(extString, "GL_OES_packed_depth_stencil") != 0;
gl_extensions.OES_depth24 = strstr(extString, "GL_OES_depth24") != 0;
gl_extensions.OES_depth_texture = strstr(extString, "GL_OES_depth_texture") != 0;
+1
View File
@@ -207,6 +207,7 @@ struct GLExtensions {
bool EXT_discard_framebuffer;
bool FBO_ARB;
bool FBO_EXT;
bool EXT_swap_control_tear;
};
extern GLExtensions gl_extensions;