mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Added workaround for missing window bit in VB GL.
This commit is contained in:
parent
322407ae9f
commit
fc07e1d7eb
|
@ -128,6 +128,8 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
|||
GLXFBConfig* fbconfigs;
|
||||
_GLFWfbconfig* result;
|
||||
int i, count = 0;
|
||||
const char* vendor;
|
||||
GLboolean trustWindowBit = GL_TRUE;
|
||||
|
||||
*found = 0;
|
||||
|
||||
|
@ -141,6 +143,11 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
|||
}
|
||||
}
|
||||
|
||||
vendor = glXGetClientString(_glfwLibrary.X11.display, GLX_VENDOR);
|
||||
|
||||
if (strcmp(vendor, "Chromium") == 0)
|
||||
trustWindowBit = GL_FALSE;
|
||||
|
||||
if (window->GLX.SGIX_fbconfig)
|
||||
{
|
||||
fbconfigs = window->GLX.ChooseFBConfigSGIX(_glfwLibrary.X11.display,
|
||||
|
@ -192,11 +199,16 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!(getFBConfigAttrib(window, fbconfigs[i], GLX_DRAWABLE_TYPE) & GLX_WINDOW_BIT))
|
||||
if (!(getFBConfigAttrib(window,
|
||||
fbconfigs[i],
|
||||
GLX_DRAWABLE_TYPE) & GLX_WINDOW_BIT))
|
||||
{
|
||||
if (trustWindowBit)
|
||||
{
|
||||
// Only consider window GLXFBConfigs
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
result[*found].redBits = getFBConfigAttrib(window, fbconfigs[i], GLX_RED_SIZE);
|
||||
result[*found].greenBits = getFBConfigAttrib(window, fbconfigs[i], GLX_GREEN_SIZE);
|
||||
|
|
Loading…
Reference in New Issue
Block a user