Commits

David Rogers committed 8ae0c95

OS X: Just add all even numbers up to max samples for FSAA options.

  • Participants
  • Parent commits 4372905
  • Branches v1-8

Comments (0)

Files changed (1)

RenderSystems/GL/src/OSX/OgreOSXGLSupport.mm

 #endif
 
 #if defined(MAC_OS_X_VERSION_10_4) && MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
-	long maxSamples;
+	long maxSamples = 0;
 	CGLDescribeRenderer(rend, 0, kCGLRPMaxSamples, &maxSamples);
 #else
-    GLint maxSamples;
+    GLint maxSamples = 0;
 	CGLDescribeRenderer(rend, 0, kCGLRPMaxSamples, &maxSamples);
 #endif
 
 
     // FSAA possibilities
     optFSAA.name = "FSAA";
-    optFSAA.possibleValues.push_back( "0" );
 
-	switch( maxSamples )
-	{
-		case 8:
-            optFSAA.possibleValues.push_back( "2" );
-            optFSAA.possibleValues.push_back( "4" );
-            optFSAA.possibleValues.push_back( "6" );
-            optFSAA.possibleValues.push_back( "8" );
-            break;
-		case 6:
-			optFSAA.possibleValues.push_back( "2" );
-			optFSAA.possibleValues.push_back( "4" );
-			optFSAA.possibleValues.push_back( "6" );
-			break;
-		case 4:
-			optFSAA.possibleValues.push_back( "2" );
-			optFSAA.possibleValues.push_back( "4" );
-			break;
-		case 2:
-			optFSAA.possibleValues.push_back( "2" );
-			break;
-		default: break;
-	}
+    for(int i = 0; i <= maxSamples; i += 2)
+        optFSAA.possibleValues.push_back( StringConverter::toString(i) );
 
     optFSAA.currentValue = "0";
     optFSAA.immutable = false;