#include "SkyBox.hpp"
#include "Viewport.hpp"
-#include "../app/init.hpp"
+#include "../app/error.hpp"
#include "../geometry/const.hpp"
#include <GL/glew.h>
glClearColor(0.0, 0.0, 0.0, 1.0);
}
-void Viewport::VSync(bool b) noexcept {
+void Viewport::VSync(bool b) {
if (SDL_GL_SetSwapInterval(b) != 0) {
- throw SDLError("SDL_GL_SetSwapInterval");
+ if (b) {
+ throw SDLError("SDL_GL_SetSwapInterval(1)");
+ } else {
+ // allow failure, because this usually means there's no vsync
+ // support at all, i.e. "it's off"
+ }
}
}