mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Improved documentation of hacks.
This commit is contained in:
parent
a79c844c4d
commit
b9d4875f3e
3
deps/GL/glext.h
vendored
3
deps/GL/glext.h
vendored
@ -4130,6 +4130,9 @@ GLAPI void APIENTRY glVertexBlendARB (GLint count);
|
|||||||
|
|
||||||
#ifndef GL_ARB_vertex_buffer_object
|
#ifndef GL_ARB_vertex_buffer_object
|
||||||
#define GL_ARB_vertex_buffer_object 1
|
#define GL_ARB_vertex_buffer_object 1
|
||||||
|
/* HACK: This is a workaround for gltypes.h on OS X 10.9 defining these types as
|
||||||
|
* long instead of ptrdiff_t
|
||||||
|
*/
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
typedef long GLsizeiptrARB;
|
typedef long GLsizeiptrARB;
|
||||||
typedef long GLintptrARB;
|
typedef long GLintptrARB;
|
||||||
|
@ -1036,6 +1036,9 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
|||||||
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
void _glfwPlatformShowWindow(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
// Make us the active application
|
// Make us the active application
|
||||||
|
// HACK: This has been moved here from initializeAppKit to prevent
|
||||||
|
// applications using only hidden windows from being activated, but
|
||||||
|
// should probably not be done every time any window is shown
|
||||||
[NSApp activateIgnoringOtherApps:YES];
|
[NSApp activateIgnoringOtherApps:YES];
|
||||||
|
|
||||||
[window->ns.object makeKeyAndOrderFront:nil];
|
[window->ns.object makeKeyAndOrderFront:nil];
|
||||||
|
@ -402,8 +402,8 @@ GLboolean _glfwRefreshContextAttribs(void)
|
|||||||
else if (glfwExtensionSupported("GL_ARB_debug_output"))
|
else if (glfwExtensionSupported("GL_ARB_debug_output"))
|
||||||
{
|
{
|
||||||
// HACK: This is a workaround for older drivers (pre KHR_debug)
|
// HACK: This is a workaround for older drivers (pre KHR_debug)
|
||||||
// not setting the debug bit in the context flags for debug
|
// not setting the debug bit in the context flags for
|
||||||
// contexts
|
// debug contexts
|
||||||
window->glDebug = GL_TRUE;
|
window->glDebug = GL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -485,8 +485,9 @@ int _glfwCreateContext(_GLFWwindow* window,
|
|||||||
if (window->glx.context == NULL)
|
if (window->glx.context == NULL)
|
||||||
{
|
{
|
||||||
// HACK: This is a fallback for the broken Mesa implementation of
|
// HACK: This is a fallback for the broken Mesa implementation of
|
||||||
// GLX_ARB_create_context_profile, which fails default 1.0 context
|
// GLX_ARB_create_context_profile, which fails default 1.0
|
||||||
// creation with a GLXBadProfileARB error in violation of the spec
|
// context creation with a GLXBadProfileARB error in violation
|
||||||
|
// of the extension spec
|
||||||
if (_glfw.x11.errorCode == _glfw.glx.errorBase + GLXBadProfileARB &&
|
if (_glfw.x11.errorCode == _glfw.glx.errorBase + GLXBadProfileARB &&
|
||||||
wndconfig->clientAPI == GLFW_OPENGL_API &&
|
wndconfig->clientAPI == GLFW_OPENGL_API &&
|
||||||
wndconfig->glProfile == GLFW_OPENGL_ANY_PROFILE &&
|
wndconfig->glProfile == GLFW_OPENGL_ANY_PROFILE &&
|
||||||
|
@ -129,8 +129,8 @@ static GLboolean createWindow(_GLFWwindow* window,
|
|||||||
if (wndconfig->monitor == NULL)
|
if (wndconfig->monitor == NULL)
|
||||||
{
|
{
|
||||||
// HACK: This is a workaround for windows without a background pixel
|
// HACK: This is a workaround for windows without a background pixel
|
||||||
// not getting any decorations on certain older versions of Compiz
|
// not getting any decorations on certain older versions of
|
||||||
// running on Intel hardware
|
// Compiz running on Intel hardware
|
||||||
wa.background_pixel = BlackPixel(_glfw.x11.display,
|
wa.background_pixel = BlackPixel(_glfw.x11.display,
|
||||||
_glfw.x11.screen);
|
_glfw.x11.screen);
|
||||||
wamask |= CWBackPixel;
|
wamask |= CWBackPixel;
|
||||||
@ -258,6 +258,9 @@ static GLboolean createWindow(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// HACK: Explicitly setting PPosition to any value causes some WMs,
|
||||||
|
// notably Compiz and Metacity, to honor the position of
|
||||||
|
// unmapped windows set by XMoveWindow
|
||||||
hints->flags |= PPosition;
|
hints->flags |= PPosition;
|
||||||
hints->x = hints->y = 0;
|
hints->x = hints->y = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user