mirror of
https://github.com/love2d/love.git
synced 2026-08-21 13:09:56 +02:00
merged in bartbes' FSAA checking
This commit is contained in:
@@ -191,10 +191,20 @@ namespace opengl
|
||||
|
||||
// Have SDL set the video mode.
|
||||
if(SDL_SetVideoMode(width, height, 32, sdlflags ) == 0)
|
||||
{
|
||||
bool failed = true;
|
||||
if(fsaa > 0)
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
std::cerr << "Could not set video mode: " << SDL_GetError() << std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if FSAA failed or not
|
||||
if(fsaa > 0)
|
||||
@@ -207,7 +217,7 @@ namespace opengl
|
||||
|
||||
// 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;
|
||||
std::cerr << "Warning, quality setting failed! (Result: buffers: " << buffers << ", samples: " << samples << ")" << std::endl;
|
||||
}
|
||||
|
||||
// Okay, setup OpenGL.
|
||||
|
||||
Reference in New Issue
Block a user