mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Choose FB config with a GLX_VISUAL_ID that matches the X screen.
Fixes glXCreateWindow returning "BadMatch (invalid parameter attributes)". Also delete the GLX_ALPHA_SIZE=8 criteria, else there might not be any matching config.
This commit is contained in:
@@ -113,8 +113,6 @@ uint64_t GLReplay::MakeOutputWindow(WindowingSystem system, void *data, bool dep
|
||||
8,
|
||||
GLX_BLUE_SIZE,
|
||||
8,
|
||||
GLX_ALPHA_SIZE,
|
||||
8,
|
||||
GLX_DOUBLEBUFFER,
|
||||
True,
|
||||
GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB,
|
||||
@@ -130,6 +128,22 @@ uint64_t GLReplay::MakeOutputWindow(WindowingSystem system, void *data, bool dep
|
||||
return eReplayCreate_APIInitFailed;
|
||||
}
|
||||
|
||||
if(draw != 0)
|
||||
{
|
||||
// Choose FB config with a GLX_VISUAL_ID that matches the X screen.
|
||||
VisualID visualid_correct = DefaultVisual(dpy, DefaultScreen(dpy))->visualid;
|
||||
for(int i = 0; i < numCfgs; i++)
|
||||
{
|
||||
int visualid;
|
||||
glXGetFBConfigAttrib(dpy, fbcfg[i], GLX_VISUAL_ID, &visualid);
|
||||
if((VisualID)visualid == visualid_correct)
|
||||
{
|
||||
fbcfg[0] = fbcfg[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int attribs[64] = {0};
|
||||
int i = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user