mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Renamed no current context error to match function.
This commit is contained in:
parent
a916997c86
commit
957ecdc9a0
@ -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
|
||||||
|
@ -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:
|
case GLFW_NO_CURRENT_CONTEXT:
|
||||||
return "There is no current GLFW window";
|
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:
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user