Просмотр исходного кода

Renamed no current context error to match function.

Camilla Berglund 13 лет назад
Родитель
Сommit
957ecdc9a0
3 измененных файлов с 7 добавлено и 7 удалено
  1. 1 1
      include/GL/glfw3.h
  2. 2 2
      src/error.c
  3. 4 4
      src/opengl.c

+ 1 - 1
include/GL/glfw3.h

@@ -448,7 +448,7 @@ extern "C" {
 /* glfwGetError/glfwErrorString tokens */
 /* glfwGetError/glfwErrorString tokens */
 #define GLFW_NO_ERROR             0
 #define GLFW_NO_ERROR             0
 #define GLFW_NOT_INITIALIZED      0x00070001
 #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_ENUM         0x00070003
 #define GLFW_INVALID_VALUE        0x00070004
 #define GLFW_INVALID_VALUE        0x00070004
 #define GLFW_OUT_OF_MEMORY        0x00070005
 #define GLFW_OUT_OF_MEMORY        0x00070005

+ 2 - 2
src/error.c

@@ -115,8 +115,8 @@ GLFWAPI const char* glfwErrorString(int error)
             return "No error";
             return "No error";
         case GLFW_NOT_INITIALIZED:
         case GLFW_NOT_INITIALIZED:
             return "The GLFW library is 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:
         case GLFW_INVALID_ENUM:
             return "Invalid argument for enum parameter";
             return "Invalid argument for enum parameter";
         case GLFW_INVALID_VALUE:
         case GLFW_INVALID_VALUE:

+ 4 - 4
src/opengl.c

@@ -551,7 +551,7 @@ GLFWAPI void glfwSwapBuffers(void)
 
 
     if (!_glfwLibrary.currentWindow)
     if (!_glfwLibrary.currentWindow)
     {
     {
-        _glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
+        _glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
         return;
         return;
     }
     }
 
 
@@ -573,7 +573,7 @@ GLFWAPI void glfwSwapInterval(int interval)
 
 
     if (!_glfwLibrary.currentWindow)
     if (!_glfwLibrary.currentWindow)
     {
     {
-        _glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
+        _glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
         return;
         return;
     }
     }
 
 
@@ -599,7 +599,7 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
     window = _glfwLibrary.currentWindow;
     window = _glfwLibrary.currentWindow;
     if (!window)
     if (!window)
     {
     {
-        _glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
+        _glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
         return GL_FALSE;
         return GL_FALSE;
     }
     }
 
 
@@ -659,7 +659,7 @@ GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname)
 
 
     if (!_glfwLibrary.currentWindow)
     if (!_glfwLibrary.currentWindow)
     {
     {
-        _glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
+        _glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
         return NULL;
         return NULL;
     }
     }