Commit 17901948 authored by Camilla Berglund's avatar Camilla Berglund
Browse files

Renamed _glfwInputError and moved to event API.

parent 21f41a2b
......@@ -47,7 +47,7 @@ GLFWAPI void glfwSetClipboardString(GLFWwindow handle, const char* string)
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return;
}
......@@ -65,7 +65,7 @@ GLFWAPI const char* glfwGetClipboardString(GLFWwindow handle)
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return NULL;
}
......
......@@ -62,15 +62,15 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
if (![[pasteboard types] containsObject:NSStringPboardType])
{
_glfwSetError(GLFW_FORMAT_UNAVAILABLE, NULL);
_glfwInputError(GLFW_FORMAT_UNAVAILABLE, NULL);
return NULL;
}
NSString* object = [pasteboard stringForType:NSStringPboardType];
if (!object)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to retrieve object from pasteboard");
_glfwInputError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to retrieve object from pasteboard");
return NULL;
}
......
......@@ -85,7 +85,8 @@ int _glfwPlatformInit(void)
CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl"));
if (_glfwLibrary.NSGL.framework == NULL)
{
_glfwSetError(GLFW_PLATFORM_ERROR, "Failed to locate OpenGL framework");
_glfwInputError(GLFW_PLATFORM_ERROR,
"NSGL: Failed to locate OpenGL framework");
return GL_FALSE;
}
......
......@@ -47,7 +47,7 @@ GLFWAPI id glfwGetCocoaWindow(GLFWwindow handle)
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return 0;
}
......@@ -65,7 +65,7 @@ GLFWAPI id glfwGetNSGLContext(GLFWwindow handle)
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return NULL;
}
......
......@@ -692,7 +692,7 @@ static GLboolean createWindow(_GLFWwindow* window,
if (window->NS.object == nil)
{
_glfwSetError(GLFW_PLATFORM_ERROR, "Cocoa: Failed to create window");
_glfwInputError(GLFW_PLATFORM_ERROR, "Cocoa: Failed to create window");
return GL_FALSE;
}
......@@ -734,8 +734,8 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
_glfwLibrary.NS.delegate = [[GLFWApplicationDelegate alloc] init];
if (_glfwLibrary.NS.delegate == nil)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to create application delegate");
_glfwInputError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to create application delegate");
return GL_FALSE;
}
......@@ -745,8 +745,8 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
window->NS.delegate = [[GLFWWindowDelegate alloc] initWithGlfwWindow:window];
if (window->NS.delegate == nil)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to create window delegate");
_glfwInputError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to create window delegate");
return GL_FALSE;
}
......
......@@ -55,7 +55,8 @@ static GLboolean parseGLVersion(int* api, int* major, int* minor, int* rev)
version = (const char*) glGetString(GL_VERSION);
if (!version)
{
_glfwSetError(GLFW_PLATFORM_ERROR, "Failed to retrieve version string");
_glfwInputError(GLFW_PLATFORM_ERROR,
"Failed to retrieve context version string");
return GL_FALSE;
}
......@@ -73,7 +74,8 @@ static GLboolean parseGLVersion(int* api, int* major, int* minor, int* rev)
if (!sscanf(version, "%d.%d.%d", &_major, &_minor, &_rev))
{
_glfwSetError(GLFW_PLATFORM_ERROR, "No version found in version string");
_glfwInputError(GLFW_PLATFORM_ERROR,
"No version found in context version string");
return GL_FALSE;
}
......@@ -262,7 +264,7 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
if (wndconfig->clientAPI != GLFW_OPENGL_API &&
wndconfig->clientAPI != GLFW_OPENGL_ES_API)
{
_glfwSetError(GLFW_INVALID_ENUM, "Invalid client API requested");
_glfwInputError(GLFW_INVALID_ENUM, "Invalid client API requested");
return GL_FALSE;
}
......@@ -278,9 +280,9 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
// OpenGL 2.x series ended with version 2.1
// OpenGL 3.x series ended with version 3.3
_glfwSetError(GLFW_INVALID_VALUE,
"Invalid OpenGL version %i.%i requested",
wndconfig->glMajor, wndconfig->glMinor);
_glfwInputError(GLFW_INVALID_VALUE,
"Invalid OpenGL version %i.%i requested",
wndconfig->glMajor, wndconfig->glMinor);
return GL_FALSE;
}
else
......@@ -293,8 +295,8 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
if (wndconfig->glProfile != GLFW_OPENGL_CORE_PROFILE &&
wndconfig->glProfile != GLFW_OPENGL_COMPAT_PROFILE)
{
_glfwSetError(GLFW_INVALID_ENUM,
"Invalid OpenGL profile requested");
_glfwInputError(GLFW_INVALID_ENUM,
"Invalid OpenGL profile requested");
return GL_FALSE;
}
......@@ -304,9 +306,9 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
// Desktop OpenGL context profiles are only defined for version 3.2
// and above
_glfwSetError(GLFW_INVALID_VALUE,
"Context profiles only exist for "
"OpenGL version 3.2 and above");
_glfwInputError(GLFW_INVALID_VALUE,
"Context profiles only exist for "
"OpenGL version 3.2 and above");
return GL_FALSE;
}
}
......@@ -314,9 +316,9 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
if (wndconfig->glForward && wndconfig->glMajor < 3)
{
// Forward-compatible contexts are only defined for OpenGL version 3.0 and above
_glfwSetError(GLFW_INVALID_VALUE,
"Forward compatibility only exist for OpenGL "
"version 3.0 and above");
_glfwInputError(GLFW_INVALID_VALUE,
"Forward compatibility only exist for OpenGL "
"version 3.0 and above");
return GL_FALSE;
}
}
......@@ -330,9 +332,9 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
// OpenGL ES 1.x series ended with version 1.1
// OpenGL ES 2.x series ended with version 2.0
_glfwSetError(GLFW_INVALID_VALUE,
"Invalid OpenGL ES version %i.%i requested",
wndconfig->glMajor, wndconfig->glMinor);
_glfwInputError(GLFW_INVALID_VALUE,
"Invalid OpenGL ES version %i.%i requested",
wndconfig->glMajor, wndconfig->glMinor);
return GL_FALSE;
}
else
......@@ -343,16 +345,16 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
if (wndconfig->glProfile)
{
// OpenGL ES does not support profiles
_glfwSetError(GLFW_INVALID_VALUE,
"Context profiles are not supported by OpenGL ES");
_glfwInputError(GLFW_INVALID_VALUE,
"Context profiles are not supported by OpenGL ES");
return GL_FALSE;
}
if (wndconfig->glForward)
{
// OpenGL ES does not support forward-compatibility
_glfwSetError(GLFW_INVALID_VALUE,
"Forward compatibility is not supported by OpenGL ES");
_glfwInputError(GLFW_INVALID_VALUE,
"Forward compatibility is not supported by OpenGL ES");
return GL_FALSE;
}
}
......@@ -362,8 +364,8 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
if (wndconfig->glRobustness != GLFW_NO_RESET_NOTIFICATION &&
wndconfig->glRobustness != GLFW_LOSE_CONTEXT_ON_RESET)
{
_glfwSetError(GLFW_INVALID_VALUE,
"Invalid OpenGL robustness mode requested");
_glfwInputError(GLFW_INVALID_VALUE,
"Invalid context robustness mode requested");
return GL_FALSE;
}
}
......@@ -397,8 +399,8 @@ GLboolean _glfwRefreshContextParams(void)
window->GetStringi = (PFNGLGETSTRINGIPROC) glfwGetProcAddress("glGetStringi");
if (!window->GetStringi)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Entry point retrieval is broken");
_glfwInputError(GLFW_PLATFORM_ERROR,
"Entry point retrieval is broken");
return GL_FALSE;
}
}
......@@ -494,7 +496,7 @@ GLboolean _glfwIsValidContext(_GLFWwndconfig* wndconfig)
// For API consistency, we emulate the behavior of the
// {GLX|WGL}_ARB_create_context extension and fail here
_glfwSetError(GLFW_VERSION_UNAVAILABLE, NULL);
_glfwInputError(GLFW_VERSION_UNAVAILABLE, NULL);
return GL_FALSE;
}
......@@ -551,7 +553,7 @@ GLFWAPI void glfwMakeContextCurrent(GLFWwindow handle)
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return;
}
......@@ -570,7 +572,7 @@ GLFWAPI GLFWwindow glfwGetCurrentContext(void)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return NULL;
}
......@@ -588,7 +590,7 @@ GLFWAPI void glfwSwapBuffers(GLFWwindow handle)
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return;
}
......@@ -604,13 +606,13 @@ GLFWAPI void glfwSwapInterval(int interval)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return;
}
if (!_glfwPlatformGetCurrentContext())
{
_glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
_glfwInputError(GLFW_NO_CURRENT_CONTEXT, NULL);
return;
}
......@@ -629,20 +631,20 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return GL_FALSE;
}
window = _glfwPlatformGetCurrentContext();
if (!window)
{
_glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
_glfwInputError(GLFW_NO_CURRENT_CONTEXT, NULL);
return GL_FALSE;
}
if (extension == NULL || *extension == '\0')
{
_glfwSetError(GLFW_INVALID_VALUE, NULL);
_glfwInputError(GLFW_INVALID_VALUE, NULL);
return GL_FALSE;
}
......@@ -690,13 +692,13 @@ GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return NULL;
}
if (!_glfwPlatformGetCurrentContext())
{
_glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
_glfwInputError(GLFW_NO_CURRENT_CONTEXT, NULL);
return NULL;
}
......
......@@ -83,7 +83,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window,
configs = (EGLConfig*) malloc(sizeof(EGLConfig) * count);
if (!configs)
{
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
_glfwInputError(GLFW_OUT_OF_MEMORY, NULL);
return NULL;
}
......@@ -92,8 +92,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window,
{
free(configs);
_glfwSetError(GLFW_API_UNAVAILABLE,
"EGL: No EGLConfigs returned");
_glfwInputError(GLFW_API_UNAVAILABLE, "EGL: No EGLConfigs returned");
return NULL;
}
......@@ -102,7 +101,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window,
{
free(configs);
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
_glfwInputError(GLFW_OUT_OF_MEMORY, NULL);
return NULL;
}
......@@ -203,8 +202,8 @@ static int createContext(_GLFWwindow* window,
eglChooseConfig(_glfwLibrary.EGL.display, attribs, &config, 1, &count);
if (!count)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"EGL: Failed to retrieve the selected EGLConfig");
_glfwInputError(GLFW_PLATFORM_ERROR,
"EGL: Failed to retrieve the selected EGLConfig");
return GL_FALSE;
}
}
......@@ -251,8 +250,8 @@ static int createContext(_GLFWwindow* window,
if (window->EGL.visual == NULL)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"EGL: Failed to retrieve visual for EGLConfig");
_glfwInputError(GLFW_PLATFORM_ERROR,
"EGL: Failed to retrieve visual for EGLConfig");
return GL_FALSE;
}
}
......@@ -262,7 +261,8 @@ static int createContext(_GLFWwindow* window,
{
if (!eglBindAPI(EGL_OPENGL_ES_API))
{
_glfwSetError(GLFW_PLATFORM_ERROR, "EGL: OpenGL ES is not supported");
_glfwInputError(GLFW_PLATFORM_ERROR,
"EGL: OpenGL ES is not supported");
return GL_FALSE;
}
}
......@@ -270,7 +270,7 @@ static int createContext(_GLFWwindow* window,
{
if (!eglBindAPI(EGL_OPENGL_API))
{
_glfwSetError(GLFW_PLATFORM_ERROR, "EGL: OpenGL is not supported");
_glfwInputError(GLFW_PLATFORM_ERROR, "EGL: OpenGL is not supported");
return GL_FALSE;
}
}
......@@ -337,7 +337,7 @@ static int createContext(_GLFWwindow* window,
{
// TODO: Handle all the various error codes here
_glfwSetError(GLFW_PLATFORM_ERROR, "EGL: Failed to create context");
_glfwInputError(GLFW_PLATFORM_ERROR, "EGL: Failed to create context");
return GL_FALSE;
}
......@@ -379,7 +379,7 @@ int _glfwInitOpenGL(void)
if (!_glfwLibrary.EGL.libEGL)
{
_glfwSetError(GLFW_PLATFORM_ERROR, "EGL: Failed to find libEGL");
_glfwInputError(GLFW_PLATFORM_ERROR, "EGL: Failed to find libEGL");
return GL_FALSE;
}
#endif
......@@ -387,8 +387,7 @@ int _glfwInitOpenGL(void)
_glfwLibrary.EGL.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY);
if (_glfwLibrary.EGL.display == EGL_NO_DISPLAY)
{
_glfwSetError(GLFW_API_UNAVAILABLE,
"EGL: Failed to get EGL display");
_glfwInputError(GLFW_API_UNAVAILABLE, "EGL: Failed to get EGL display");
return GL_FALSE;
}
......@@ -396,8 +395,7 @@ int _glfwInitOpenGL(void)
&_glfwLibrary.EGL.majorVersion,
&_glfwLibrary.EGL.minorVersion))
{
_glfwSetError(GLFW_API_UNAVAILABLE,
"EGL: Failed to initialize EGL");
_glfwInputError(GLFW_API_UNAVAILABLE, "EGL: Failed to initialize EGL");
return GL_FALSE;
}
......@@ -445,16 +443,16 @@ int _glfwCreateContext(_GLFWwindow* window,
fbconfigs = getFBConfigs(window, wndconfig, &fbcount);
if (!fbconfigs)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"EGL: No usable EGLFBConfigs found");
_glfwInputError(GLFW_PLATFORM_ERROR,
"EGL: No usable EGLFBConfigs found");
return GL_FALSE;
}
result = _glfwChooseFBConfig(fbconfig, fbconfigs, fbcount);
if (!result)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"EGL: No EGLFBConfig matched the criteria");
_glfwInputError(GLFW_PLATFORM_ERROR,
"EGL: No EGLFBConfig matched the criteria");
free(fbconfigs);
return GL_FALSE;
......@@ -526,8 +524,8 @@ void _glfwPlatformMakeContextCurrent(_GLFWwindow* window)
NULL);
if (window->EGL.surface == EGL_NO_SURFACE)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"EGL: Failed to create window surface");
_glfwInputError(GLFW_PLATFORM_ERROR,
"EGL: Failed to create window surface");
}
}
......
......@@ -118,13 +118,13 @@ GLFWAPI GLFWvidmode* glfwGetVideoModes(int* count)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return NULL;
}
if (count == NULL)
{
_glfwSetError(GLFW_INVALID_VALUE, NULL);
_glfwInputError(GLFW_INVALID_VALUE, NULL);
return NULL;
}
......@@ -146,14 +146,14 @@ GLFWAPI void glfwGetDesktopMode(GLFWvidmode* mode)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return;
}
if (mode == NULL)
{
_glfwSetError(GLFW_INVALID_VALUE,
"glfwGetDesktopMode: Parameter 'mode' cannot be NULL");
_glfwInputError(GLFW_INVALID_VALUE,
"glfwGetDesktopMode: Parameter 'mode' cannot be NULL");
return;
}
......
......@@ -48,14 +48,14 @@ GLFWAPI void glfwSetGamma(float gamma)
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return;
}
if (gamma <= 0.f)
{
_glfwSetError(GLFW_INVALID_VALUE,
"Gamma value must be greater than zero");
_glfwInputError(GLFW_INVALID_VALUE,
"Gamma value must be greater than zero");
return;
}
......@@ -91,7 +91,7 @@ GLFWAPI void glfwGetGammaRamp(GLFWgammaramp* ramp)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return;
}
......@@ -107,7 +107,7 @@ GLFWAPI void glfwSetGammaRamp(const GLFWgammaramp* ramp)
{
if (!_glfwInitialized)
{
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return;
}
......
......@@ -104,8 +104,8 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
{
if (!_glfwLibrary.GLX.SGIX_fbconfig)
{
_glfwSetError(GLFW_API_UNAVAILABLE,
"GLX: GLXFBConfig support not found");
_glfwInputError(GLFW_API_UNAVAILABLE,
"GLX: GLXFBConfig support not found");
return NULL;
}
}
......@@ -127,8 +127,8 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
&count);
if (!count)
{
_glfwSetError(GLFW_API_UNAVAILABLE,
"GLX: No GLXFBConfigs returned");
_glfwInputError(GLFW_API_UNAVAILABLE,
"GLX: No GLXFBConfigs returned");
return NULL;
}
}
......@@ -139,8 +139,8 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
&count);
if (!count)
{
_glfwSetError(GLFW_API_UNAVAILABLE,
"GLX: No GLXFBConfigs returned");
_glfwInputError(GLFW_API_UNAVAILABLE,
"GLX: No GLXFBConfigs returned");
return NULL;
}
}
......@@ -148,7 +148,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
result = (_GLFWfbconfig*) malloc(sizeof(_GLFWfbconfig) * count);
if (!result)
{
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
_glfwInputError(GLFW_OUT_OF_MEMORY, NULL);
return NULL;
}
......@@ -302,8 +302,8 @@ static int createContext(_GLFWwindow* window,
if (fbconfig == NULL)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"GLX: Failed to retrieve the selected GLXFBConfig");
_glfwInputError(GLFW_PLATFORM_ERROR,
"GLX: Failed to retrieve the selected GLXFBConfig");
return GL_FALSE;
}
}
......@@ -325,8 +325,8 @@ static int createContext(_GLFWwindow* window,
{
XFree(fbconfig);
_glfwSetError(GLFW_PLATFORM_ERROR,
"GLX: Failed to retrieve visual for GLXFBConfig");
_glfwInputError(GLFW_PLATFORM_ERROR,
"GLX: Failed to retrieve visual for GLXFBConfig");
return GL_FALSE;
}
......@@ -336,9 +336,9 @@ static int createContext(_GLFWwindow* window,
!_glfwLibrary.GLX.ARB_create_context_profile ||
!_glfwLibrary.GLX.EXT_create_context_es2_profile)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"GLX: OpenGL ES requested but "
"GLX_EXT_create_context_es2_profile is unavailable");
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
"GLX: OpenGL ES requested but "
"GLX_EXT_create_context_es2_profile is unavailable");
return GL_FALSE;
}
}
......@@ -347,9 +347,9 @@ static int createContext(_GLFWwindow* window,
{
if (!_glfwLibrary.GLX.ARB_create_context)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"GLX: Forward compatibility requested but "
"GLX_ARB_create_context_profile is unavailable");
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
"GLX: Forward compatibility requested but "
"GLX_ARB_create_context_profile is unavailable");
return GL_FALSE;
}
}
......@@ -359,9 +359,9 @@ static int createContext(_GLFWwindow* window,
if (!_glfwLibrary.GLX.ARB_create_context ||
!_glfwLibrary.GLX.ARB_create_context_profile)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"GLX: An OpenGL profile requested but "
"GLX_ARB_create_context_profile is unavailable");
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
"GLX: An OpenGL profile requested but "
"GLX_ARB_create_context_profile is unavailable");
return GL_FALSE;
}
}
......@@ -461,7 +461,7 @@ static int createContext(_GLFWwindow* window,
if (window->GLX.context == NULL)
{
_glfwSetError(GLFW_PLATFORM_ERROR, "GLX: Failed to create context");
_glfwInputError(GLFW_PLATFORM_ERROR, "GLX: Failed to create context");
return GL_FALSE;
}
......@@ -501,7 +501,7 @@ int _glfwInitOpenGL(void)
if (!_glfwLibrary.GLX.libGL)
{
_glfwSetError(GLFW_PLATFORM_ERROR, "GLX: Failed to find libGL");
_glfwInputError(GLFW_PLATFORM_ERROR, "GLX: Failed to find libGL");
return GL_FALSE;
}
#endif
......@@ -511,7 +511,7 @@ int _glfwInitOpenGL(void)
&_glfwLibrary.GLX.errorBase,
&_glfwLibrary.GLX.eventBase))
{
_glfwSetError(GLFW_API_UNAVAILABLE, "GLX: GLX support not found");
_glfwInputError(GLFW_API_UNAVAILABLE, "GLX: GLX support not found");
return GL_FALSE;
}
......@@ -519,7 +519,8 @@ int _glfwInitOpenGL(void)
&_glfwLibrary.GLX.majorVersion,
&_glfwLibrary.GLX.minorVersion))
{
_glfwSetError(GLFW_API_UNAVAILABLE, "GLX: Failed to query GLX version");