Save out multisample count on default framebuffer

This commit is contained in:
baldurk
2014-12-02 23:27:03 +00:00
parent 46c70e6f69
commit 4aab1172a4
4 changed files with 39 additions and 12 deletions
+6
View File
@@ -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);
+5
View File
@@ -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)