mirror of
https://github.com/glest/glest-source.git
synced 2025-08-17 21:51:17 +02:00
- added verticle synch option, to enable use:
EnableVSynch=true
This commit is contained in:
@@ -58,6 +58,8 @@ bool Window::allowAltEnterFullscreenToggle = true;
|
||||
#endif
|
||||
int Window::lastShowMouseState = 0;
|
||||
|
||||
bool Window::tryVSynch = false;
|
||||
|
||||
// ========== PUBLIC ==========
|
||||
|
||||
Window::Window() {
|
||||
@@ -360,6 +362,14 @@ void Window::setupGraphicsScreen(int depthBits, int stencilBits, bool hardware_a
|
||||
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, newStencilBits);
|
||||
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, newDepthBits);
|
||||
|
||||
const SDL_VideoInfo *info = SDL_GetVideoInfo();
|
||||
#ifdef SDL_GL_SWAP_CONTROL
|
||||
if(Window::tryVSynch == true) {
|
||||
/* we want vsync for smooth scrolling */
|
||||
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
// setup LOD bias factor
|
||||
//const float lodBias = std::max(std::min( configHandler->Get("TextureLODBias", 0.0f) , 4.0f), -4.0f);
|
||||
const float lodBias = max(min(0.0f,4.0f),-4.0f);
|
||||
|
Reference in New Issue
Block a user