API tag and error message cleanup.

This commit is contained in:
Camilla Berglund 2012-08-28 15:03:57 +02:00
parent 9696321334
commit e10d935efe
27 changed files with 93 additions and 104 deletions

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Cocoa/NSOpenGL
// Platform: Cocoa
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------
@ -70,7 +70,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
if (!object)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Cocoa/NSGL: Failed to retrieve object from pasteboard");
"Cocoa: Failed to retrieve object from pasteboard");
return NULL;
}

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Cocoa/NSOpenGL
// Platform: Cocoa
// API Version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Cocoa/NSOpenGL
// Platform: Cocoa
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Cocoa/NSOpenGL
// Platform: Cocoa
// API Version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Cocoa/NSOpenGL
// Platform: Cocoa
// API Version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Cocoa/NSOpenGL
// Platform: Cocoa
// API Version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -674,8 +674,7 @@ static GLboolean createWindow(_GLFWwindow* window,
if (window->NS.object == nil)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Cocoa/NSOpenGL: Failed to create window");
_glfwSetError(GLFW_PLATFORM_ERROR, "Cocoa: Failed to create window");
return GL_FALSE;
}
@ -717,8 +716,8 @@ static GLboolean createContext(_GLFWwindow* window,
(wndconfig->glMajor == 3 && wndconfig->glMinor != 2))
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Cocoa/NSOpenGL: The targeted version of Mac OS X does "
"not support any OpenGL version above 2.1 except 3.2");
"NSOpenGL: The targeted version of Mac OS X does not "
"support any OpenGL version above 2.1 except 3.2");
return GL_FALSE;
}
@ -727,8 +726,8 @@ static GLboolean createContext(_GLFWwindow* window,
if (!wndconfig->glForward)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Cocoa/NSOpenGL: The targeted version of Mac OS X "
"only supports OpenGL 3.2 contexts if they are "
"NSOpenGL: The targeted version of Mac OS X only "
"supports OpenGL 3.2 contexts if they are "
"forward-compatible");
return GL_FALSE;
}
@ -736,8 +735,8 @@ static GLboolean createContext(_GLFWwindow* window,
if (wndconfig->glProfile != GLFW_OPENGL_CORE_PROFILE)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Cocoa/NSOpenGL: The targeted version of Mac OS X "
"only supports OpenGL 3.2 contexts if they use the "
"NSOpenGL: The targeted version of Mac OS X only "
"supports OpenGL 3.2 contexts if they use the "
"core profile");
return GL_FALSE;
}
@ -747,8 +746,8 @@ static GLboolean createContext(_GLFWwindow* window,
if (wndconfig->glMajor > 2)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Cocoa/NSOpenGL: The targeted version of Mac OS X does "
"not support OpenGL version 3.0 or above");
"NSOpenGL: The targeted version of Mac OS X does not "
"support OpenGL version 3.0 or above");
return GL_FALSE;
}
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
@ -757,8 +756,8 @@ static GLboolean createContext(_GLFWwindow* window,
if (wndconfig->glRobustness)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Cocoa/NSOpenGL: Mac OS X does not support OpenGL "
"robustness strategies");
"NSOpenGL: Mac OS X does not support OpenGL robustness "
"strategies");
return GL_FALSE;
}
@ -821,7 +820,7 @@ static GLboolean createContext(_GLFWwindow* window,
if (window->NSGL.pixelFormat == nil)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Cocoa/NSOpenGL: Failed to create OpenGL pixel format");
"NSOpenGL: Failed to create OpenGL pixel format");
return GL_FALSE;
}
@ -836,7 +835,7 @@ static GLboolean createContext(_GLFWwindow* window,
if (window->NSGL.context == nil)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Cocoa/NSOpenGL: Failed to create OpenGL context");
"NSOpenGL: Failed to create OpenGL context");
return GL_FALSE;
}
@ -868,8 +867,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (_glfwLibrary.NS.delegate == nil)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Cocoa/NSOpenGL: Failed to create application "
"delegate");
"Cocoa: Failed to create application delegate");
return GL_FALSE;
}
@ -880,7 +878,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (window->NS.delegate == nil)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Cocoa/NSOpenGL: Failed to create window delegate");
"Cocoa: Failed to create window delegate");
return GL_FALSE;
}

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Win32/WGL
// Platform: Win32
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------
@ -53,7 +53,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
if (!wideString)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to convert clipboard string to "
"Win32: Failed to convert clipboard string to "
"wide string");
return;
}
@ -66,7 +66,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
free(wideString);
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to allocate global handle for clipboard");
"Win32: Failed to allocate global handle for clipboard");
return;
}
@ -79,7 +79,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
free(wideString);
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to open clipboard");
"Win32: Failed to open clipboard");
return;
}
@ -108,7 +108,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
if (!OpenClipboard(window->Win32.handle))
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to open clipboard");
"Win32: Failed to open clipboard");
return NULL;
}
@ -118,7 +118,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
CloseClipboard();
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to retrieve clipboard data");
"Win32: Failed to retrieve clipboard data");
return NULL;
}
@ -132,7 +132,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
if (!_glfwLibrary.Win32.clipboardString)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to convert wide string to UTF-8");
"Win32: Failed to convert wide string to UTF-8");
return NULL;
}

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Win32/WGL
// Platform: Win32
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Win32/WGL
// Platform: Win32
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Win32/WGL
// Platform: Win32
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Win32/WGL
// Platform: Win32
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Win32/WGL
// Platform: Win32
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -171,15 +171,14 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
if (!available)
{
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "Win32/WGL: No pixel formats found");
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "WGL: No pixel formats found");
return NULL;
}
fbconfigs = (_GLFWfbconfig*) malloc(sizeof(_GLFWfbconfig) * available);
if (!fbconfigs)
{
_glfwSetError(GLFW_OUT_OF_MEMORY,
"Win32/WGL: Failed to allocate _GLFWfbconfig array");
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
return NULL;
}
@ -285,6 +284,9 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
if (*found == 0)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: No usable pixel formats found");
free(fbconfigs);
return NULL;
}
@ -310,15 +312,15 @@ static GLboolean createContext(_GLFWwindow* window,
if (!DescribePixelFormat(window->WGL.DC, pixelFormat, sizeof(pfd), &pfd))
{
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
"Win32/WGL: Failed to retrieve PFD for selected pixel format");
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32: Failed to retrieve PFD for selected pixel format");
return GL_FALSE;
}
if (!SetPixelFormat(window->WGL.DC, pixelFormat, &pfd))
{
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
"Win32/WGL: Failed to set selected pixel format");
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32: Failed to set selected pixel format");
return GL_FALSE;
}
@ -360,7 +362,7 @@ static GLboolean createContext(_GLFWwindow* window,
if (!window->WGL.ARB_create_context_profile)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Win32/WGL: OpenGL profile requested but "
"WGL: OpenGL profile requested but "
"WGL_ARB_create_context_profile is unavailable");
return GL_FALSE;
}
@ -369,7 +371,7 @@ static GLboolean createContext(_GLFWwindow* window,
!window->WGL.EXT_create_context_es2_profile)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Win32/WGL: OpenGL ES 2.x profile requested but "
"WGL: OpenGL ES 2.x profile requested but "
"WGL_EXT_create_context_es2_profile is unavailable");
return GL_FALSE;
}
@ -392,7 +394,7 @@ static GLboolean createContext(_GLFWwindow* window,
if (!window->WGL.ARB_create_context_robustness)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Win32/WGL: An OpenGL robustness strategy was "
"WGL: An OpenGL robustness strategy was "
"requested but WGL_ARB_create_context_robustness "
"is unavailable");
return GL_FALSE;
@ -415,7 +417,7 @@ static GLboolean createContext(_GLFWwindow* window,
if (!window->WGL.context)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Win32/WGL: Failed to create OpenGL context");
"WGL: Failed to create OpenGL context");
return GL_FALSE;
}
}
@ -425,7 +427,7 @@ static GLboolean createContext(_GLFWwindow* window,
if (!window->WGL.context)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to create OpenGL context");
"WGL: Failed to create OpenGL context");
return GL_FALSE;
}
@ -434,8 +436,8 @@ static GLboolean createContext(_GLFWwindow* window,
if (!wglShareLists(share, window->WGL.context))
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to enable sharing with "
"specified OpenGL context");
"WGL: Failed to enable sharing with specified "
"OpenGL context");
return GL_FALSE;
}
}
@ -466,7 +468,7 @@ int _glfwCreateContext(_GLFWwindow* window,
if (!window->WGL.DC)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to retrieve DC for window");
"Win32: Failed to retrieve DC for window");
return GL_FALSE;
}
@ -478,16 +480,12 @@ int _glfwCreateContext(_GLFWwindow* window,
fbconfigs = getFBConfigs(window, &fbcount);
if (!fbconfigs)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: No usable pixel formats found");
return GL_FALSE;
}
result = _glfwChooseFBConfig(fbconfig, fbconfigs, fbcount);
if (!result)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
_glfwSetError(GLFW_FORMAT_UNAVAILABLE,
"Win32/WGL: No pixel format matched the criteria");
free(fbconfigs);
@ -620,7 +618,7 @@ void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long
if (!wglCopyContext(src->WGL.context, dst->WGL.context, mask))
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to copy OpenGL context attributes");
"WGL: Failed to copy OpenGL context attributes");
}
}

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: Win32/WGL
// Platform: Win32
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -813,7 +813,7 @@ static ATOM registerWindowClass(void)
if (!classAtom)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"Win32/WGL: Failed to register window class");
"Win32: Failed to register window class");
return 0;
}
@ -886,7 +886,7 @@ static int createWindow(_GLFWwindow* window,
if (!wideTitle)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"glfwCreateWindow: Failed to convert title to wide string");
"Win32: Failed to convert title to wide string");
return GL_FALSE;
}
@ -904,7 +904,7 @@ static int createWindow(_GLFWwindow* window,
if (!window->Win32.handle)
{
_glfwSetError(GLFW_PLATFORM_ERROR, "Win32/WGL: Failed to create window");
_glfwSetError(GLFW_PLATFORM_ERROR, "Win32: Failed to create window");
return GL_FALSE;
}
@ -1008,8 +1008,8 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (!window->WGL.ARB_create_context)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Win32/WGL: A forward compatible OpenGL context "
"requested but WGL_ARB_create_context is unavailable");
"WGL: A forward compatible OpenGL context requested "
"but WGL_ARB_create_context is unavailable");
return GL_FALSE;
}
@ -1021,7 +1021,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (!window->WGL.ARB_create_context_profile)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"Win32/WGL: OpenGL profile requested but "
"WGL: OpenGL profile requested but "
"WGL_ARB_create_context_profile is unavailable");
return GL_FALSE;
}
@ -1107,7 +1107,7 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
if (!wideTitle)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"glfwSetWindowTitle: Failed to convert title to wide string");
"Win32: Failed to convert title to wide string");
return;
}

View File

@ -267,7 +267,7 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
if (mode != GLFW_WINDOWED && mode != GLFW_FULLSCREEN)
{
_glfwSetError(GLFW_INVALID_ENUM,
"glfwCreateWindow: Invalid enum for 'mode' parameter");
"glfwCreateWindow: Invalid window mode");
return GL_FALSE;
}
@ -292,8 +292,7 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
window = (_GLFWwindow*) malloc(sizeof(_GLFWwindow));
if (!window)
{
_glfwSetError(GLFW_OUT_OF_MEMORY,
"glfwCreateWindow: Failed to allocate window structure");
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
return NULL;
}

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: X11/GLX
// Platform: X11
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------
@ -182,7 +182,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
if (_glfwLibrary.X11.selection.status == _GLFW_CONVERSION_FAILED)
{
_glfwSetError(GLFW_FORMAT_UNAVAILABLE,
"X11/GLX: Failed to convert selection to string");
"X11: Failed to convert selection to string");
return NULL;
}

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: X11/GLX
// Platform: X11
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------
@ -442,7 +442,7 @@ GLFWvidmode* _glfwPlatformGetVideoModes(int* found)
if (visuals == NULL)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to retrieve the available visuals");
"X11: Failed to retrieve the available visuals");
return 0;
}

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: X11/GLX
// Platform: X11
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------
@ -115,7 +115,7 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to get gamma ramp due to size "
"X11: Failed to get gamma ramp due to size "
"incompatibility");
return;
}
@ -166,7 +166,7 @@ void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to set gamma ramp due to size "
"X11: Failed to set gamma ramp due to size "
"incompatibility");
return;
}

View File

@ -491,7 +491,7 @@ static GLboolean initDisplay(void)
_glfwLibrary.X11.display = XOpenDisplay(NULL);
if (!_glfwLibrary.X11.display)
{
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "X11/GLX: Failed to open X display");
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "X11: Failed to open X display");
return GL_FALSE;
}
@ -525,7 +525,7 @@ static GLboolean initDisplay(void)
&_glfwLibrary.X11.RandR.minorVersion))
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to query RandR version");
"X11: Failed to query RandR version");
return GL_FALSE;
}
}

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: X11 (Unix)
// Platform: X11
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: X11/GLX
// Platform: X11
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: X11/GLX
// Platform: X11
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -78,7 +78,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
if (!_glfwLibrary.GLX.SGIX_fbconfig)
{
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
"X11/GLX: GLXFBConfig support not found");
"GLX: GLXFBConfig support not found");
return NULL;
}
}
@ -101,7 +101,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
if (!count)
{
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
"X11/GLX: No GLXFBConfigs returned");
"GLX: No GLXFBConfigs returned");
return NULL;
}
}
@ -113,7 +113,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
if (!count)
{
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
"X11/GLX: No GLXFBConfigs returned");
"GLX: No GLXFBConfigs returned");
return NULL;
}
}
@ -121,8 +121,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
result = (_GLFWfbconfig*) malloc(sizeof(_GLFWfbconfig) * count);
if (!result)
{
_glfwSetError(GLFW_OUT_OF_MEMORY,
"X11/GLX: Failed to allocate _GLFWfbconfig array");
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
return NULL;
}
@ -242,7 +241,7 @@ static int createContext(_GLFWwindow* window,
if (fbconfig == NULL)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to retrieve the selected GLXFBConfig");
"GLX: Failed to retrieve the selected GLXFBConfig");
return GL_FALSE;
}
}
@ -264,7 +263,7 @@ static int createContext(_GLFWwindow* window,
XFree(fbconfig);
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to retrieve visual for GLXFBConfig");
"GLX: Failed to retrieve visual for GLXFBConfig");
return GL_FALSE;
}
@ -303,7 +302,7 @@ static int createContext(_GLFWwindow* window,
if (!_glfwLibrary.GLX.ARB_create_context_profile)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"X11/GLX: An OpenGL profile requested but "
"GLX: An OpenGL profile requested but "
"GLX_ARB_create_context_profile is unavailable");
return GL_FALSE;
}
@ -312,7 +311,7 @@ static int createContext(_GLFWwindow* window,
!_glfwLibrary.GLX.EXT_create_context_es2_profile)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"X11/GLX: OpenGL ES 2.x profile requested but "
"GLX: OpenGL ES 2.x profile requested but "
"GLX_EXT_create_context_es2_profile is unavailable");
return GL_FALSE;
}
@ -334,7 +333,7 @@ static int createContext(_GLFWwindow* window,
if (!_glfwLibrary.GLX.ARB_create_context_robustness)
{
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
"X11/GLX: An OpenGL robustness strategy was "
"GLX: An OpenGL robustness strategy was "
"requested but GLX_ARB_create_context_robustness "
"is unavailable");
return GL_FALSE;
@ -397,7 +396,7 @@ static int createContext(_GLFWwindow* window,
// TODO: Handle all the various error codes here
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to create OpenGL context");
"GLX: Failed to create OpenGL context");
return GL_FALSE;
}
@ -437,7 +436,7 @@ int _glfwInitOpenGL(void)
if (!_glfwLibrary.GLX.libGL)
{
_glfwSetError(GLFW_PLATFORM_ERROR, "X11/GLX: Failed to find libGL");
_glfwSetError(GLFW_PLATFORM_ERROR, "GLX: Failed to find libGL");
return GL_FALSE;
}
#endif
@ -445,7 +444,7 @@ int _glfwInitOpenGL(void)
// Check if GLX is supported on this display
if (!glXQueryExtension(_glfwLibrary.X11.display, NULL, NULL))
{
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "X11/GLX: GLX support not found");
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "GLX: GLX support not found");
return GL_FALSE;
}
@ -454,7 +453,7 @@ int _glfwInitOpenGL(void)
&_glfwLibrary.GLX.minorVersion))
{
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
"X11/GLX: Failed to query GLX version");
"GLX: Failed to query GLX version");
return GL_FALSE;
}
@ -565,17 +564,13 @@ int _glfwCreateContext(_GLFWwindow* window,
fbconfigs = getFBConfigs(window, &fbcount);
if (!fbconfigs)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: No usable GLXFBConfigs found");
return GL_FALSE;
}
result = _glfwChooseFBConfig(fbconfig, fbconfigs, fbcount);
if (!result)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: No GLXFBConfig matched the criteria");
"GLX: No GLXFBConfig matched the criteria");
free(fbconfigs);
return GL_FALSE;

View File

@ -1,6 +1,6 @@
//========================================================================
// GLFW - An OpenGL library
// Platform: X11/GLX
// Platform: X11
// API version: 3.0
// WWW: http://www.glfw.org/
//------------------------------------------------------------------------

View File

@ -131,8 +131,7 @@ static GLboolean createWindow(_GLFWwindow* window,
// TODO: Handle all the various error codes here and translate them
// to GLFW errors
_glfwSetError(GLFW_PLATFORM_ERROR,
"X11/GLX: Failed to create window");
_glfwSetError(GLFW_PLATFORM_ERROR, "X11: Failed to create window");
return GL_FALSE;
}
}
@ -191,7 +190,7 @@ static GLboolean createWindow(_GLFWwindow* window,
if (!hints)
{
_glfwSetError(GLFW_OUT_OF_MEMORY,
"X11/GLX: Failed to allocate WM hints");
"X11: Failed to allocate WM hints");
return GL_FALSE;
}
@ -208,7 +207,7 @@ static GLboolean createWindow(_GLFWwindow* window,
if (!hints)
{
_glfwSetError(GLFW_OUT_OF_MEMORY,
"X11/GLX: Failed to allocate size hints");
"X11: Failed to allocate size hints");
return GL_FALSE;
}