diff --git a/src/glx_context.c b/src/glx_context.c index e1731705..0cf10fd0 100644 --- a/src/glx_context.c +++ b/src/glx_context.c @@ -181,12 +181,11 @@ int _glfwInitContextAPI(void) return GL_FALSE; } - // Check if GLX is supported on this display if (!glXQueryExtension(_glfw.x11.display, &_glfw.glx.errorBase, &_glfw.glx.eventBase)) { - _glfwInputError(GLFW_API_UNAVAILABLE, "GLX: GLX support not found"); + _glfwInputError(GLFW_API_UNAVAILABLE, "GLX: GLX extension not found"); return GL_FALSE; } @@ -199,6 +198,13 @@ int _glfwInitContextAPI(void) 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")) { _glfw.glx.SwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC) @@ -250,12 +256,6 @@ int _glfwInitContextAPI(void) if (_glfwPlatformExtensionSupported("GLX_EXT_create_context_es2_profile")) _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; }