diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index 6e395670..8759ea79 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -666,7 +666,7 @@ extern "C" { /*! @brief GLFW could not find support for the requested client API on the * system. */ -#define GLFW_OPENGL_UNAVAILABLE 0x00070006 +#define GLFW_API_UNAVAILABLE 0x00070006 /*! @brief The requested OpenGL or GLES version is not available. */ #define GLFW_VERSION_UNAVAILABLE 0x00070007 diff --git a/src/init.c b/src/init.c index e0a919c2..4d7b731e 100644 --- a/src/init.c +++ b/src/init.c @@ -215,17 +215,17 @@ GLFWAPI const char* glfwErrorString(int error) case GLFW_NOT_INITIALIZED: return "The GLFW library is not initialized"; case GLFW_NO_CURRENT_CONTEXT: - return "There is no current OpenGL context"; + return "There is no current context"; case GLFW_INVALID_ENUM: return "Invalid argument for enum parameter"; case GLFW_INVALID_VALUE: return "Invalid value for parameter"; case GLFW_OUT_OF_MEMORY: return "Out of memory"; - case GLFW_OPENGL_UNAVAILABLE: - return "OpenGL is not available on this machine"; + case GLFW_API_UNAVAILABLE: + return "The requested client API is unavailable"; case GLFW_VERSION_UNAVAILABLE: - return "The requested OpenGL version is unavailable"; + return "The requested client API version is unavailable"; case GLFW_PLATFORM_ERROR: return "A platform-specific error occurred"; case GLFW_FORMAT_UNAVAILABLE: diff --git a/src/win32_opengl.c b/src/win32_opengl.c index 7689f9c0..f1e911f3 100644 --- a/src/win32_opengl.c +++ b/src/win32_opengl.c @@ -189,7 +189,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) if (!available) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, "WGL: No pixel formats found"); + _glfwSetError(GLFW_API_UNAVAILABLE, "WGL: No pixel formats found"); return NULL; } diff --git a/src/x11_init.c b/src/x11_init.c index 3fbbd608..2eb09517 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -491,7 +491,7 @@ static GLboolean initDisplay(void) _glfwLibrary.X11.display = XOpenDisplay(NULL); if (!_glfwLibrary.X11.display) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, "X11: Failed to open X display"); + _glfwSetError(GLFW_API_UNAVAILABLE, "X11: Failed to open X display"); return GL_FALSE; } diff --git a/src/x11_opengl.c b/src/x11_opengl.c index 790ad062..20b17e0e 100644 --- a/src/x11_opengl.c +++ b/src/x11_opengl.c @@ -93,7 +93,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) { if (!_glfwLibrary.GLX.SGIX_fbconfig) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, + _glfwSetError(GLFW_API_UNAVAILABLE, "GLX: GLXFBConfig support not found"); return NULL; } @@ -116,7 +116,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) &count); if (!count) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, + _glfwSetError(GLFW_API_UNAVAILABLE, "GLX: No GLXFBConfigs returned"); return NULL; } @@ -128,7 +128,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) &count); if (!count) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, + _glfwSetError(GLFW_API_UNAVAILABLE, "GLX: No GLXFBConfigs returned"); return NULL; } @@ -465,7 +465,7 @@ int _glfwInitOpenGL(void) // Check if GLX is supported on this display if (!glXQueryExtension(_glfwLibrary.X11.display, NULL, NULL)) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, "GLX: GLX support not found"); + _glfwSetError(GLFW_API_UNAVAILABLE, "GLX: GLX support not found"); return GL_FALSE; } @@ -473,8 +473,7 @@ int _glfwInitOpenGL(void) &_glfwLibrary.GLX.majorVersion, &_glfwLibrary.GLX.minorVersion)) { - _glfwSetError(GLFW_OPENGL_UNAVAILABLE, - "GLX: Failed to query GLX version"); + _glfwSetError(GLFW_API_UNAVAILABLE, "GLX: Failed to query GLX version"); return GL_FALSE; }