Camilla Berglund пре 11 година
родитељ
комит
d3ae574418
1 измењених фајлова са 8 додато и 8 уклоњено
  1. 8 8
      src/glx_context.c

+ 8 - 8
src/glx_context.c

@@ -181,12 +181,11 @@ int _glfwInitContextAPI(void)
         return GL_FALSE;
         return GL_FALSE;
     }
     }
 
 
-    // Check if GLX is supported on this display
     if (!glXQueryExtension(_glfw.x11.display,
     if (!glXQueryExtension(_glfw.x11.display,
                            &_glfw.glx.errorBase,
                            &_glfw.glx.errorBase,
                            &_glfw.glx.eventBase))
                            &_glfw.glx.eventBase))
     {
     {
-        _glfwInputError(GLFW_API_UNAVAILABLE, "GLX: GLX support not found");
+        _glfwInputError(GLFW_API_UNAVAILABLE, "GLX: GLX extension not found");
         return GL_FALSE;
         return GL_FALSE;
     }
     }
 
 
@@ -199,6 +198,13 @@ int _glfwInitContextAPI(void)
         return GL_FALSE;
         return GL_FALSE;
     }
     }
 
 
+    if (_glfw.glx.versionMajor == 1 && _glfw.glx.versionMinor < 3)
+    {
+        _glfwInputError(GLFW_API_UNAVAILABLE,
+                        "GLX: GLX version 1.3 is required");
+        return GL_FALSE;
+    }
+
     if (_glfwPlatformExtensionSupported("GLX_EXT_swap_control"))
     if (_glfwPlatformExtensionSupported("GLX_EXT_swap_control"))
     {
     {
         _glfw.glx.SwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)
         _glfw.glx.SwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)
@@ -250,12 +256,6 @@ int _glfwInitContextAPI(void)
     if (_glfwPlatformExtensionSupported("GLX_EXT_create_context_es2_profile"))
     if (_glfwPlatformExtensionSupported("GLX_EXT_create_context_es2_profile"))
         _glfw.glx.EXT_create_context_es2_profile = GL_TRUE;
         _glfw.glx.EXT_create_context_es2_profile = GL_TRUE;
 
 
-    if (_glfw.glx.versionMajor == 1 && _glfw.glx.versionMinor < 3)
-    {
-        _glfwInputError(GLFW_API_UNAVAILABLE, "No GLXFBConfig support found");
-        return GL_FALSE;
-    }
-
     return GL_TRUE;
     return GL_TRUE;
 }
 }