mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Use the same FBConfig for both the pbuffer and context, else it might fail
This commit is contained in:
@@ -85,25 +85,6 @@ uint64_t GLReplay::MakeOutputWindow(void *wn, bool depth)
|
||||
|
||||
if(dpy == NULL)
|
||||
return 0;
|
||||
|
||||
// don't need to care about the fb config as we won't be using the default framebuffer (backbuffer)
|
||||
static int visAttribs[] = { 0 };
|
||||
int numCfgs = 0;
|
||||
GLXFBConfig *fbcfg = glXChooseFBConfigProc(dpy, DefaultScreen(dpy), visAttribs, &numCfgs);
|
||||
|
||||
if(fbcfg == NULL)
|
||||
{
|
||||
XCloseDisplay(dpy);
|
||||
RDCERR("Couldn't choose default framebuffer config");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// don't care about pbuffer properties for same reason as backbuffer
|
||||
int pbAttribs[] = { GLX_PBUFFER_WIDTH, 32, GLX_PBUFFER_HEIGHT, 32, 0 };
|
||||
|
||||
wnd = glXCreatePbufferProc(dpy, fbcfg[0], pbAttribs);
|
||||
|
||||
XFree(fbcfg);
|
||||
}
|
||||
|
||||
static int visAttribs[] = {
|
||||
@@ -147,6 +128,14 @@ uint64_t GLReplay::MakeOutputWindow(void *wn, bool depth)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(wnd == 0)
|
||||
{
|
||||
// don't care about pbuffer properties as we won't render directly to this
|
||||
int pbAttribs[] = { GLX_PBUFFER_WIDTH, 32, GLX_PBUFFER_HEIGHT, 32, 0 };
|
||||
|
||||
wnd = glXCreatePbufferProc(dpy, fbcfg[0], pbAttribs);
|
||||
}
|
||||
|
||||
XFree(fbcfg);
|
||||
|
||||
OutputWindow win;
|
||||
|
||||
Reference in New Issue
Block a user