diff --git a/scene_opengl_glx.cpp b/scene_opengl_glx.cpp index 1fe2f180ba..cf7933baf5 100644 --- a/scene_opengl_glx.cpp +++ b/scene_opengl_glx.cpp @@ -270,12 +270,15 @@ bool SceneOpenGL::initBufferConfigs() fbcbuffer_nondb = NULL; for (int i = 0; i < 2; i++) { - int back, stencil, depth, caveat, alpha; + int back, stencil, depth, caveat, msaa_buffers, msaa_samples, alpha; back = i > 0 ? INT_MAX : 1; stencil = INT_MAX; depth = INT_MAX; caveat = INT_MAX; + msaa_buffers = INT_MAX; + msaa_samples = INT_MAX; alpha = 0; + for (int j = 0; j < cnt; j++) { XVisualInfo *vi; int visual_depth; @@ -322,10 +325,26 @@ bool SceneOpenGL::initBufferConfigs() GLX_CONFIG_CAVEAT, &caveat_value); if (caveat_value > caveat) continue; + + int msaa_buffers_value; + glXGetFBConfigAttrib(display(), fbconfigs[j], GLX_SAMPLE_BUFFERS, + &msaa_buffers_value); + if (msaa_buffers_value > msaa_buffers) + continue; + + int msaa_samples_value; + glXGetFBConfigAttrib(display(), fbconfigs[j], GLX_SAMPLES, + &msaa_samples_value); + if (msaa_samples_value > msaa_samples) + continue; + back = back_value; stencil = stencil_value; depth = depth_value; caveat = caveat_value; + msaa_buffers = msaa_buffers_value; + msaa_samples = msaa_samples_value; + if (i > 0) fbcbuffer_nondb = fbconfigs[ j ]; else