diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c index 24aee146c..10228cc3b 100644 --- a/cogl/winsys/cogl-winsys-glx.c +++ b/cogl/winsys/cogl-winsys-glx.c @@ -776,20 +776,13 @@ glx_attributes_from_framebuffer_config (CoglDisplay *display, attributes[i++] = GLX_STENCIL_SIZE; attributes[i++] = config->need_stencil ? 1: GLX_DONT_CARE; - if (glx_renderer->glx_major == 1 && glx_renderer->glx_minor >= 4) + if (glx_renderer->glx_major == 1 && glx_renderer->glx_minor >= 4 && + config->samples_per_pixel) { - if (config->samples_per_pixel) - { - attributes[i++] = GLX_SAMPLE_BUFFERS; - attributes[i++] = 1; - attributes[i++] = GLX_SAMPLES; - attributes[i++] = config->samples_per_pixel; - } - else - { - attributes[i++] = GLX_SAMPLE_BUFFERS; - attributes[i++] = 0; - } + attributes[i++] = GLX_SAMPLE_BUFFERS; + attributes[i++] = 1; + attributes[i++] = GLX_SAMPLES; + attributes[i++] = config->samples_per_pixel; } attributes[i++] = None;