Explorar o código

Should now fall back to no FSAA when it is not available at all

[email protected] %!s(int64=15) %!d(string=hai) anos
pai
achega
a4241646b7
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/modules/graphics/opengl/Graphics.cpp

+ 6 - 0
src/modules/graphics/opengl/Graphics.cpp

@@ -198,6 +198,12 @@ namespace opengl
 				// FSAA might have failed, disable it and try again
 				SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 0);
 				failed = SDL_SetVideoMode(width, height, 32, sdlflags ) == 0;
+				if (failed)
+				{
+					// There might be no FSAA at all
+					SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 0);
+					failed = SDL_SetVideoMode(width, height, 32, sdlflags ) == 0;
+				}
 			}
 			if(failed)
 			{