mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 07:26:34 +00:00
Save out multisample count on default framebuffer
This commit is contained in:
@@ -346,6 +346,8 @@ GLXContext glXCreateContext(Display *dpy, XVisualInfo *vis, GLXContext shareList
|
||||
OpenGLHook::glhooks.glXGetConfig_real(dpy, vis, GLX_STENCIL_SIZE, &value); init.stencilBits = value;
|
||||
value = 1; // default to srgb
|
||||
OpenGLHook::glhooks.glXGetConfig_real(dpy, vis, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB, &value); init.isSRGB = value;
|
||||
value = 1;
|
||||
OpenGLHook::glhooks.glXGetConfig_real(dpy, vis, GLX_SAMPLES_ARB, &value); init.isSRGB = RDCMAX(1, value);
|
||||
|
||||
OpenGLHook::glhooks.GetDriver()->CreateContext(NULL, ret, shareList, init);
|
||||
|
||||
@@ -419,6 +421,10 @@ GLXContext glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config, GLXConte
|
||||
OpenGLHook::glhooks.glXGetConfig_real(dpy, vis, GLX_BUFFER_SIZE, &value); init.colorBits = value;
|
||||
OpenGLHook::glhooks.glXGetConfig_real(dpy, vis, GLX_DEPTH_SIZE, &value); init.depthBits = value;
|
||||
OpenGLHook::glhooks.glXGetConfig_real(dpy, vis, GLX_STENCIL_SIZE, &value); init.stencilBits = value;
|
||||
value = 1; // default to srgb
|
||||
OpenGLHook::glhooks.glXGetConfig_real(dpy, vis, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB, &value); init.isSRGB = value;
|
||||
value = 1;
|
||||
OpenGLHook::glhooks.glXGetConfig_real(dpy, vis, GLX_SAMPLES_ARB, &value); init.isSRGB = RDCMAX(1, value);
|
||||
|
||||
XFree(vis);
|
||||
|
||||
|
||||
@@ -309,6 +309,11 @@ class OpenGLHook : LibraryHook
|
||||
int srgb = 1;
|
||||
glhooks.wglGetPixelFormatAttribivARB_realfunc(dc, pf, 0, 1, &attrname, &srgb);
|
||||
ret.isSRGB = srgb;
|
||||
|
||||
attrname = eWGL_SAMPLES_ARB;
|
||||
int ms = 1;
|
||||
glhooks.wglGetPixelFormatAttribivARB_realfunc(dc, pf, 0, 1, &attrname, &ms);
|
||||
ret.multiSamples = RDCMAX(1, ms);
|
||||
}
|
||||
|
||||
if(pfd.iPixelType != PFD_TYPE_RGBA)
|
||||
|
||||
Reference in New Issue
Block a user