1
0
Fork 0
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:
Camilla Berglund 2012-06-03 16:09:13 +02:00
parent 322407ae9f
commit fc07e1d7eb

View File

@ -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);