From 94d16c095c09cc5a6068301688ab303cdb06c286 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Mon, 11 Jul 2011 21:08:49 +0200 Subject: [PATCH] Always check if the fsaa succeeded --- src/modules/graphics/opengl/Graphics.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index fc58f8d64..23afdd6cd 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -218,21 +218,17 @@ namespace opengl height = videoinfo->current_h; } - // Check if FSAA failed or not - if(fsaa > 0) + GLint buffers; + GLint samples; + + glGetIntegerv( GL_SAMPLE_BUFFERS_ARB, & buffers ) ; + glGetIntegerv( GL_SAMPLES_ARB, & samples ) ; + + // Don't fail because of this, but issue a warning. + if ( (! buffers && fsaa) || (samples != fsaa)) { - GLint buffers; - GLint samples; - - glGetIntegerv( GL_SAMPLE_BUFFERS_ARB, & buffers ) ; - glGetIntegerv( GL_SAMPLES_ARB, & samples ) ; - - // Don't fail because of this, but issue a warning. - if ( ! buffers || (samples != fsaa)) - { - std::cerr << "Warning, quality setting failed! (Result: buffers: " << buffers << ", samples: " << samples << ")" << std::endl; - fsaa = !buffers ? 0 : samples; - } + std::cerr << "Warning, quality setting failed! (Result: buffers: " << buffers << ", samples: " << samples << ")" << std::endl; + fsaa = !buffers ? 0 : samples; } // Okay, setup OpenGL.