mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
API tag and error message cleanup.
This commit is contained in:
parent
9696321334
commit
e10d935efe
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Cocoa/NSOpenGL
|
// Platform: Cocoa
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
@ -70,7 +70,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
||||||
if (!object)
|
if (!object)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Cocoa/NSGL: Failed to retrieve object from pasteboard");
|
"Cocoa: Failed to retrieve object from pasteboard");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Cocoa/NSOpenGL
|
// Platform: Cocoa
|
||||||
// API Version: 3.0
|
// API Version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Cocoa/NSOpenGL
|
// Platform: Cocoa
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Cocoa/NSOpenGL
|
// Platform: Cocoa
|
||||||
// API Version: 3.0
|
// API Version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Cocoa/NSOpenGL
|
// Platform: Cocoa
|
||||||
// API Version: 3.0
|
// API Version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Cocoa/NSOpenGL
|
// Platform: Cocoa
|
||||||
// API Version: 3.0
|
// API Version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -674,8 +674,7 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||||
|
|
||||||
if (window->NS.object == nil)
|
if (window->NS.object == nil)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR, "Cocoa: Failed to create window");
|
||||||
"Cocoa/NSOpenGL: Failed to create window");
|
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -717,8 +716,8 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
(wndconfig->glMajor == 3 && wndconfig->glMinor != 2))
|
(wndconfig->glMajor == 3 && wndconfig->glMinor != 2))
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Cocoa/NSOpenGL: The targeted version of Mac OS X does "
|
"NSOpenGL: The targeted version of Mac OS X does not "
|
||||||
"not support any OpenGL version above 2.1 except 3.2");
|
"support any OpenGL version above 2.1 except 3.2");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -727,8 +726,8 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (!wndconfig->glForward)
|
if (!wndconfig->glForward)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Cocoa/NSOpenGL: The targeted version of Mac OS X "
|
"NSOpenGL: The targeted version of Mac OS X only "
|
||||||
"only supports OpenGL 3.2 contexts if they are "
|
"supports OpenGL 3.2 contexts if they are "
|
||||||
"forward-compatible");
|
"forward-compatible");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -736,8 +735,8 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (wndconfig->glProfile != GLFW_OPENGL_CORE_PROFILE)
|
if (wndconfig->glProfile != GLFW_OPENGL_CORE_PROFILE)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Cocoa/NSOpenGL: The targeted version of Mac OS X "
|
"NSOpenGL: The targeted version of Mac OS X only "
|
||||||
"only supports OpenGL 3.2 contexts if they use the "
|
"supports OpenGL 3.2 contexts if they use the "
|
||||||
"core profile");
|
"core profile");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -747,8 +746,8 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (wndconfig->glMajor > 2)
|
if (wndconfig->glMajor > 2)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Cocoa/NSOpenGL: The targeted version of Mac OS X does "
|
"NSOpenGL: The targeted version of Mac OS X does not "
|
||||||
"not support OpenGL version 3.0 or above");
|
"support OpenGL version 3.0 or above");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
||||||
|
@ -757,8 +756,8 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (wndconfig->glRobustness)
|
if (wndconfig->glRobustness)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Cocoa/NSOpenGL: Mac OS X does not support OpenGL "
|
"NSOpenGL: Mac OS X does not support OpenGL robustness "
|
||||||
"robustness strategies");
|
"strategies");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -821,7 +820,7 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (window->NSGL.pixelFormat == nil)
|
if (window->NSGL.pixelFormat == nil)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Cocoa/NSOpenGL: Failed to create OpenGL pixel format");
|
"NSOpenGL: Failed to create OpenGL pixel format");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -836,7 +835,7 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (window->NSGL.context == nil)
|
if (window->NSGL.context == nil)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Cocoa/NSOpenGL: Failed to create OpenGL context");
|
"NSOpenGL: Failed to create OpenGL context");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -868,8 +867,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||||
if (_glfwLibrary.NS.delegate == nil)
|
if (_glfwLibrary.NS.delegate == nil)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Cocoa/NSOpenGL: Failed to create application "
|
"Cocoa: Failed to create application delegate");
|
||||||
"delegate");
|
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -880,7 +878,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||||
if (window->NS.delegate == nil)
|
if (window->NS.delegate == nil)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Cocoa/NSOpenGL: Failed to create window delegate");
|
"Cocoa: Failed to create window delegate");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Win32/WGL
|
// Platform: Win32
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
@ -53,7 +53,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
|
||||||
if (!wideString)
|
if (!wideString)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to convert clipboard string to "
|
"Win32: Failed to convert clipboard string to "
|
||||||
"wide string");
|
"wide string");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
|
||||||
free(wideString);
|
free(wideString);
|
||||||
|
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to allocate global handle for clipboard");
|
"Win32: Failed to allocate global handle for clipboard");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
|
||||||
free(wideString);
|
free(wideString);
|
||||||
|
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to open clipboard");
|
"Win32: Failed to open clipboard");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
||||||
if (!OpenClipboard(window->Win32.handle))
|
if (!OpenClipboard(window->Win32.handle))
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to open clipboard");
|
"Win32: Failed to open clipboard");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
||||||
CloseClipboard();
|
CloseClipboard();
|
||||||
|
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to retrieve clipboard data");
|
"Win32: Failed to retrieve clipboard data");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
||||||
if (!_glfwLibrary.Win32.clipboardString)
|
if (!_glfwLibrary.Win32.clipboardString)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Win32/WGL
|
// Platform: Win32
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Win32/WGL
|
// Platform: Win32
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Win32/WGL
|
// Platform: Win32
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Win32/WGL
|
// Platform: Win32
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Win32/WGL
|
// Platform: Win32
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -171,15 +171,14 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
||||||
|
|
||||||
if (!available)
|
if (!available)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "Win32/WGL: No pixel formats found");
|
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "WGL: No pixel formats found");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
fbconfigs = (_GLFWfbconfig*) malloc(sizeof(_GLFWfbconfig) * available);
|
fbconfigs = (_GLFWfbconfig*) malloc(sizeof(_GLFWfbconfig) * available);
|
||||||
if (!fbconfigs)
|
if (!fbconfigs)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OUT_OF_MEMORY,
|
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
|
||||||
"Win32/WGL: Failed to allocate _GLFWfbconfig array");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,6 +284,9 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
||||||
|
|
||||||
if (*found == 0)
|
if (*found == 0)
|
||||||
{
|
{
|
||||||
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
|
"Win32/WGL: No usable pixel formats found");
|
||||||
|
|
||||||
free(fbconfigs);
|
free(fbconfigs);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -310,15 +312,15 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
|
|
||||||
if (!DescribePixelFormat(window->WGL.DC, pixelFormat, sizeof(pfd), &pfd))
|
if (!DescribePixelFormat(window->WGL.DC, pixelFormat, sizeof(pfd), &pfd))
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to retrieve PFD for selected pixel format");
|
"Win32: Failed to retrieve PFD for selected pixel format");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SetPixelFormat(window->WGL.DC, pixelFormat, &pfd))
|
if (!SetPixelFormat(window->WGL.DC, pixelFormat, &pfd))
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to set selected pixel format");
|
"Win32: Failed to set selected pixel format");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,7 +362,7 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (!window->WGL.ARB_create_context_profile)
|
if (!window->WGL.ARB_create_context_profile)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Win32/WGL: OpenGL profile requested but "
|
"WGL: OpenGL profile requested but "
|
||||||
"WGL_ARB_create_context_profile is unavailable");
|
"WGL_ARB_create_context_profile is unavailable");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -369,7 +371,7 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
!window->WGL.EXT_create_context_es2_profile)
|
!window->WGL.EXT_create_context_es2_profile)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_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");
|
"WGL_EXT_create_context_es2_profile is unavailable");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -392,7 +394,7 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (!window->WGL.ARB_create_context_robustness)
|
if (!window->WGL.ARB_create_context_robustness)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Win32/WGL: An OpenGL robustness strategy was "
|
"WGL: An OpenGL robustness strategy was "
|
||||||
"requested but WGL_ARB_create_context_robustness "
|
"requested but WGL_ARB_create_context_robustness "
|
||||||
"is unavailable");
|
"is unavailable");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
@ -415,7 +417,7 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (!window->WGL.context)
|
if (!window->WGL.context)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Win32/WGL: Failed to create OpenGL context");
|
"WGL: Failed to create OpenGL context");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,7 +427,7 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (!window->WGL.context)
|
if (!window->WGL.context)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to create OpenGL context");
|
"WGL: Failed to create OpenGL context");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,8 +436,8 @@ static GLboolean createContext(_GLFWwindow* window,
|
||||||
if (!wglShareLists(share, window->WGL.context))
|
if (!wglShareLists(share, window->WGL.context))
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to enable sharing with "
|
"WGL: Failed to enable sharing with specified "
|
||||||
"specified OpenGL context");
|
"OpenGL context");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -466,7 +468,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||||
if (!window->WGL.DC)
|
if (!window->WGL.DC)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to retrieve DC for window");
|
"Win32: Failed to retrieve DC for window");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,16 +480,12 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||||
|
|
||||||
fbconfigs = getFBConfigs(window, &fbcount);
|
fbconfigs = getFBConfigs(window, &fbcount);
|
||||||
if (!fbconfigs)
|
if (!fbconfigs)
|
||||||
{
|
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
|
||||||
"Win32/WGL: No usable pixel formats found");
|
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
result = _glfwChooseFBConfig(fbconfig, fbconfigs, fbcount);
|
result = _glfwChooseFBConfig(fbconfig, fbconfigs, fbcount);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_FORMAT_UNAVAILABLE,
|
||||||
"Win32/WGL: No pixel format matched the criteria");
|
"Win32/WGL: No pixel format matched the criteria");
|
||||||
|
|
||||||
free(fbconfigs);
|
free(fbconfigs);
|
||||||
|
@ -620,7 +618,7 @@ void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long
|
||||||
if (!wglCopyContext(src->WGL.context, dst->WGL.context, mask))
|
if (!wglCopyContext(src->WGL.context, dst->WGL.context, mask))
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to copy OpenGL context attributes");
|
"WGL: Failed to copy OpenGL context attributes");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: Win32/WGL
|
// Platform: Win32
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -813,7 +813,7 @@ static ATOM registerWindowClass(void)
|
||||||
if (!classAtom)
|
if (!classAtom)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"Win32/WGL: Failed to register window class");
|
"Win32: Failed to register window class");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -886,7 +886,7 @@ static int createWindow(_GLFWwindow* window,
|
||||||
if (!wideTitle)
|
if (!wideTitle)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"glfwCreateWindow: Failed to convert title to wide string");
|
"Win32: Failed to convert title to wide string");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -904,7 +904,7 @@ static int createWindow(_GLFWwindow* window,
|
||||||
|
|
||||||
if (!window->Win32.handle)
|
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;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1008,8 +1008,8 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||||
if (!window->WGL.ARB_create_context)
|
if (!window->WGL.ARB_create_context)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Win32/WGL: A forward compatible OpenGL context "
|
"WGL: A forward compatible OpenGL context requested "
|
||||||
"requested but WGL_ARB_create_context is unavailable");
|
"but WGL_ARB_create_context is unavailable");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1021,7 +1021,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||||
if (!window->WGL.ARB_create_context_profile)
|
if (!window->WGL.ARB_create_context_profile)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"Win32/WGL: OpenGL profile requested but "
|
"WGL: OpenGL profile requested but "
|
||||||
"WGL_ARB_create_context_profile is unavailable");
|
"WGL_ARB_create_context_profile is unavailable");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1107,7 +1107,7 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
|
||||||
if (!wideTitle)
|
if (!wideTitle)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"glfwSetWindowTitle: Failed to convert title to wide string");
|
"Win32: Failed to convert title to wide string");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
|
||||||
if (mode != GLFW_WINDOWED && mode != GLFW_FULLSCREEN)
|
if (mode != GLFW_WINDOWED && mode != GLFW_FULLSCREEN)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_INVALID_ENUM,
|
_glfwSetError(GLFW_INVALID_ENUM,
|
||||||
"glfwCreateWindow: Invalid enum for 'mode' parameter");
|
"glfwCreateWindow: Invalid window mode");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,8 +292,7 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
|
||||||
window = (_GLFWwindow*) malloc(sizeof(_GLFWwindow));
|
window = (_GLFWwindow*) malloc(sizeof(_GLFWwindow));
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OUT_OF_MEMORY,
|
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
|
||||||
"glfwCreateWindow: Failed to allocate window structure");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: X11/GLX
|
// Platform: X11
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
@ -182,7 +182,7 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
||||||
if (_glfwLibrary.X11.selection.status == _GLFW_CONVERSION_FAILED)
|
if (_glfwLibrary.X11.selection.status == _GLFW_CONVERSION_FAILED)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_FORMAT_UNAVAILABLE,
|
_glfwSetError(GLFW_FORMAT_UNAVAILABLE,
|
||||||
"X11/GLX: Failed to convert selection to string");
|
"X11: Failed to convert selection to string");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: X11/GLX
|
// Platform: X11
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
@ -442,7 +442,7 @@ GLFWvidmode* _glfwPlatformGetVideoModes(int* found)
|
||||||
if (visuals == NULL)
|
if (visuals == NULL)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"X11/GLX: Failed to retrieve the available visuals");
|
"X11: Failed to retrieve the available visuals");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: X11/GLX
|
// Platform: X11
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
@ -115,7 +115,7 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
|
||||||
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"X11/GLX: Failed to get gamma ramp due to size "
|
"X11: Failed to get gamma ramp due to size "
|
||||||
"incompatibility");
|
"incompatibility");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
|
||||||
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"X11/GLX: Failed to set gamma ramp due to size "
|
"X11: Failed to set gamma ramp due to size "
|
||||||
"incompatibility");
|
"incompatibility");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,7 +491,7 @@ static GLboolean initDisplay(void)
|
||||||
_glfwLibrary.X11.display = XOpenDisplay(NULL);
|
_glfwLibrary.X11.display = XOpenDisplay(NULL);
|
||||||
if (!_glfwLibrary.X11.display)
|
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;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ static GLboolean initDisplay(void)
|
||||||
&_glfwLibrary.X11.RandR.minorVersion))
|
&_glfwLibrary.X11.RandR.minorVersion))
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"X11/GLX: Failed to query RandR version");
|
"X11: Failed to query RandR version");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: X11 (Unix)
|
// Platform: X11
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: X11/GLX
|
// Platform: X11
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: X11/GLX
|
// Platform: X11
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -78,7 +78,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
||||||
if (!_glfwLibrary.GLX.SGIX_fbconfig)
|
if (!_glfwLibrary.GLX.SGIX_fbconfig)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
||||||
"X11/GLX: GLXFBConfig support not found");
|
"GLX: GLXFBConfig support not found");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
||||||
if (!count)
|
if (!count)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
||||||
"X11/GLX: No GLXFBConfigs returned");
|
"GLX: No GLXFBConfigs returned");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
||||||
if (!count)
|
if (!count)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
||||||
"X11/GLX: No GLXFBConfigs returned");
|
"GLX: No GLXFBConfigs returned");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,8 +121,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
||||||
result = (_GLFWfbconfig*) malloc(sizeof(_GLFWfbconfig) * count);
|
result = (_GLFWfbconfig*) malloc(sizeof(_GLFWfbconfig) * count);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OUT_OF_MEMORY,
|
_glfwSetError(GLFW_OUT_OF_MEMORY, NULL);
|
||||||
"X11/GLX: Failed to allocate _GLFWfbconfig array");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +241,7 @@ static int createContext(_GLFWwindow* window,
|
||||||
if (fbconfig == NULL)
|
if (fbconfig == NULL)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"X11/GLX: Failed to retrieve the selected GLXFBConfig");
|
"GLX: Failed to retrieve the selected GLXFBConfig");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,7 +263,7 @@ static int createContext(_GLFWwindow* window,
|
||||||
XFree(fbconfig);
|
XFree(fbconfig);
|
||||||
|
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"X11/GLX: Failed to retrieve visual for GLXFBConfig");
|
"GLX: Failed to retrieve visual for GLXFBConfig");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +302,7 @@ static int createContext(_GLFWwindow* window,
|
||||||
if (!_glfwLibrary.GLX.ARB_create_context_profile)
|
if (!_glfwLibrary.GLX.ARB_create_context_profile)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"X11/GLX: An OpenGL profile requested but "
|
"GLX: An OpenGL profile requested but "
|
||||||
"GLX_ARB_create_context_profile is unavailable");
|
"GLX_ARB_create_context_profile is unavailable");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -312,7 +311,7 @@ static int createContext(_GLFWwindow* window,
|
||||||
!_glfwLibrary.GLX.EXT_create_context_es2_profile)
|
!_glfwLibrary.GLX.EXT_create_context_es2_profile)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_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");
|
"GLX_EXT_create_context_es2_profile is unavailable");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -334,7 +333,7 @@ static int createContext(_GLFWwindow* window,
|
||||||
if (!_glfwLibrary.GLX.ARB_create_context_robustness)
|
if (!_glfwLibrary.GLX.ARB_create_context_robustness)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
_glfwSetError(GLFW_VERSION_UNAVAILABLE,
|
||||||
"X11/GLX: An OpenGL robustness strategy was "
|
"GLX: An OpenGL robustness strategy was "
|
||||||
"requested but GLX_ARB_create_context_robustness "
|
"requested but GLX_ARB_create_context_robustness "
|
||||||
"is unavailable");
|
"is unavailable");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
@ -397,7 +396,7 @@ static int createContext(_GLFWwindow* window,
|
||||||
// TODO: Handle all the various error codes here
|
// TODO: Handle all the various error codes here
|
||||||
|
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"X11/GLX: Failed to create OpenGL context");
|
"GLX: Failed to create OpenGL context");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,7 +436,7 @@ int _glfwInitOpenGL(void)
|
||||||
|
|
||||||
if (!_glfwLibrary.GLX.libGL)
|
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;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -445,7 +444,7 @@ int _glfwInitOpenGL(void)
|
||||||
// Check if GLX is supported on this display
|
// Check if GLX is supported on this display
|
||||||
if (!glXQueryExtension(_glfwLibrary.X11.display, NULL, NULL))
|
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;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -454,7 +453,7 @@ int _glfwInitOpenGL(void)
|
||||||
&_glfwLibrary.GLX.minorVersion))
|
&_glfwLibrary.GLX.minorVersion))
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
_glfwSetError(GLFW_OPENGL_UNAVAILABLE,
|
||||||
"X11/GLX: Failed to query GLX version");
|
"GLX: Failed to query GLX version");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,17 +564,13 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||||
|
|
||||||
fbconfigs = getFBConfigs(window, &fbcount);
|
fbconfigs = getFBConfigs(window, &fbcount);
|
||||||
if (!fbconfigs)
|
if (!fbconfigs)
|
||||||
{
|
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
|
||||||
"X11/GLX: No usable GLXFBConfigs found");
|
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
result = _glfwChooseFBConfig(fbconfig, fbconfigs, fbcount);
|
result = _glfwChooseFBConfig(fbconfig, fbconfigs, fbcount);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
"X11/GLX: No GLXFBConfig matched the criteria");
|
"GLX: No GLXFBConfig matched the criteria");
|
||||||
|
|
||||||
free(fbconfigs);
|
free(fbconfigs);
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW - An OpenGL library
|
// GLFW - An OpenGL library
|
||||||
// Platform: X11/GLX
|
// Platform: X11
|
||||||
// API version: 3.0
|
// API version: 3.0
|
||||||
// WWW: http://www.glfw.org/
|
// WWW: http://www.glfw.org/
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
|
|
|
@ -131,8 +131,7 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||||
// TODO: Handle all the various error codes here and translate them
|
// TODO: Handle all the various error codes here and translate them
|
||||||
// to GLFW errors
|
// to GLFW errors
|
||||||
|
|
||||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
_glfwSetError(GLFW_PLATFORM_ERROR, "X11: Failed to create window");
|
||||||
"X11/GLX: Failed to create window");
|
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,7 +190,7 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||||
if (!hints)
|
if (!hints)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OUT_OF_MEMORY,
|
_glfwSetError(GLFW_OUT_OF_MEMORY,
|
||||||
"X11/GLX: Failed to allocate WM hints");
|
"X11: Failed to allocate WM hints");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +207,7 @@ static GLboolean createWindow(_GLFWwindow* window,
|
||||||
if (!hints)
|
if (!hints)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OUT_OF_MEMORY,
|
_glfwSetError(GLFW_OUT_OF_MEMORY,
|
||||||
"X11/GLX: Failed to allocate size hints");
|
"X11: Failed to allocate size hints");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user