Browse Source

Always check if the fsaa succeeded

Bart van Strien 14 years ago
parent
commit
94d16c095c
1 changed files with 9 additions and 13 deletions
  1. 9 13
      src/modules/graphics/opengl/Graphics.cpp

+ 9 - 13
src/modules/graphics/opengl/Graphics.cpp

@@ -218,21 +218,17 @@ namespace opengl
 			height = videoinfo->current_h;
 			height = videoinfo->current_h;
 		}
 		}
 
 
-		// Check if FSAA failed or not
-		if(fsaa > 0)
-		{
-			GLint buffers;
-			GLint samples;
+		GLint buffers;
+		GLint samples;
 
 
-			glGetIntegerv( GL_SAMPLE_BUFFERS_ARB, & buffers ) ;
-			glGetIntegerv( GL_SAMPLES_ARB, & 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;
-			}
+		// Don't fail because of this, but issue a warning.
+		if ( (! buffers && fsaa) || (samples != fsaa))
+		{
+			std::cerr << "Warning, quality setting failed! (Result: buffers: " << buffers << ", samples: " << samples << ")" << std::endl;
+			fsaa = !buffers ? 0 : samples;
 		}
 		}
 
 
 		// Okay, setup OpenGL.
 		// Okay, setup OpenGL.