mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 09:01:46 +00: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;
|
GLXFBConfig* fbconfigs;
|
||||||
_GLFWfbconfig* result;
|
_GLFWfbconfig* result;
|
||||||
int i, count = 0;
|
int i, count = 0;
|
||||||
|
const char* vendor;
|
||||||
|
GLboolean trustWindowBit = GL_TRUE;
|
||||||
|
|
||||||
*found = 0;
|
*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)
|
if (window->GLX.SGIX_fbconfig)
|
||||||
{
|
{
|
||||||
fbconfigs = window->GLX.ChooseFBConfigSGIX(_glfwLibrary.X11.display,
|
fbconfigs = window->GLX.ChooseFBConfigSGIX(_glfwLibrary.X11.display,
|
||||||
@ -192,10 +199,15 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(getFBConfigAttrib(window, fbconfigs[i], GLX_DRAWABLE_TYPE) & GLX_WINDOW_BIT))
|
if (!(getFBConfigAttrib(window,
|
||||||
|
fbconfigs[i],
|
||||||
|
GLX_DRAWABLE_TYPE) & GLX_WINDOW_BIT))
|
||||||
{
|
{
|
||||||
// Only consider window GLXFBConfigs
|
if (trustWindowBit)
|
||||||
continue;
|
{
|
||||||
|
// Only consider window GLXFBConfigs
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result[*found].redBits = getFBConfigAttrib(window, fbconfigs[i], GLX_RED_SIZE);
|
result[*found].redBits = getFBConfigAttrib(window, fbconfigs[i], GLX_RED_SIZE);
|
||||||
|
Loading…
Reference in New Issue
Block a user