Always check if the fsaa succeeded

This commit is contained in:
Bart van Strien
2011-07-11 21:08:49 +02:00
parent 07393c46f2
commit 94d16c095c
+1 -5
View File
@@ -218,9 +218,6 @@ namespace opengl
height = videoinfo->current_h; height = videoinfo->current_h;
} }
// Check if FSAA failed or not
if(fsaa > 0)
{
GLint buffers; GLint buffers;
GLint samples; GLint samples;
@@ -228,12 +225,11 @@ namespace opengl
glGetIntegerv( GL_SAMPLES_ARB, & samples ) ; glGetIntegerv( GL_SAMPLES_ARB, & samples ) ;
// Don't fail because of this, but issue a warning. // Don't fail because of this, but issue a warning.
if ( ! buffers || (samples != fsaa)) if ( (! buffers && fsaa) || (samples != fsaa))
{ {
std::cerr << "Warning, quality setting failed! (Result: buffers: " << buffers << ", samples: " << samples << ")" << std::endl; std::cerr << "Warning, quality setting failed! (Result: buffers: " << buffers << ", samples: " << samples << ")" << std::endl;
fsaa = !buffers ? 0 : samples; fsaa = !buffers ? 0 : samples;
} }
}
// Okay, setup OpenGL. // Okay, setup OpenGL.