From 957ecdc9a09fee81fc2aeb2723d15efa7a87a90e Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 2 Aug 2012 15:36:15 +0200 Subject: [PATCH] Renamed no current context error to match function. --- include/GL/glfw3.h | 2 +- src/error.c | 4 ++-- src/opengl.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h index 693e55f3..fd792e80 100644 --- a/include/GL/glfw3.h +++ b/include/GL/glfw3.h @@ -448,7 +448,7 @@ extern "C" { /* glfwGetError/glfwErrorString tokens */ #define GLFW_NO_ERROR 0 #define GLFW_NOT_INITIALIZED 0x00070001 -#define GLFW_NO_CURRENT_WINDOW 0x00070002 +#define GLFW_NO_CURRENT_CONTEXT 0x00070002 #define GLFW_INVALID_ENUM 0x00070003 #define GLFW_INVALID_VALUE 0x00070004 #define GLFW_OUT_OF_MEMORY 0x00070005 diff --git a/src/error.c b/src/error.c index a1af3917..c7926e9c 100644 --- a/src/error.c +++ b/src/error.c @@ -115,8 +115,8 @@ GLFWAPI const char* glfwErrorString(int error) return "No error"; case GLFW_NOT_INITIALIZED: return "The GLFW library is not initialized"; - case GLFW_NO_CURRENT_WINDOW: - return "There is no current GLFW window"; + case GLFW_NO_CURRENT_CONTEXT: + return "There is no current OpenGL context"; case GLFW_INVALID_ENUM: return "Invalid argument for enum parameter"; case GLFW_INVALID_VALUE: diff --git a/src/opengl.c b/src/opengl.c index 01609d86..59166bfa 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -551,7 +551,7 @@ GLFWAPI void glfwSwapBuffers(void) if (!_glfwLibrary.currentWindow) { - _glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL); + _glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL); return; } @@ -573,7 +573,7 @@ GLFWAPI void glfwSwapInterval(int interval) if (!_glfwLibrary.currentWindow) { - _glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL); + _glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL); return; } @@ -599,7 +599,7 @@ GLFWAPI int glfwExtensionSupported(const char* extension) window = _glfwLibrary.currentWindow; if (!window) { - _glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL); + _glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL); return GL_FALSE; } @@ -659,7 +659,7 @@ GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname) if (!_glfwLibrary.currentWindow) { - _glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL); + _glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL); return NULL; }