mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Drop vsync workaround for wxWidgets
wxWidgets already sets it's prefered mode. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
1a1340182f
commit
1cab428e6e
3 changed files with 1 additions and 27 deletions
|
|
@ -449,18 +449,3 @@ bool ogl_Init(void* (load)(const char*))
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void ogl_SetVsyncEnabled(bool enabled)
|
||||
{
|
||||
[[maybe_unused]] const int interval = enabled ? 1 : 0;
|
||||
#if !CONFIG2_GLES && OS_WIN
|
||||
if (ogl_HaveExtension("WGL_EXT_swap_control"))
|
||||
wglSwapIntervalEXT(interval);
|
||||
#elif !CONFIG2_GLES && !OS_MACOSX
|
||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||
if (GLXVersion && ogl_HaveExtension("GLX_SGI_swap_control"))
|
||||
glXSwapIntervalSGI(interval);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2026 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -52,11 +52,6 @@ extern bool ogl_Init(void* (load)(const char*), void* display, int subsystem);
|
|||
extern bool ogl_Init(void* (load)(const char*));
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Change vsync state.
|
||||
**/
|
||||
extern void ogl_SetVsyncEnabled(bool enabled);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// extensions
|
||||
|
||||
|
|
|
|||
|
|
@ -313,12 +313,6 @@ std::unique_ptr<IDevice> CDevice::Create(SDL_Window* window)
|
|||
ogl_Init(SDL_GL_GetProcAddress);
|
||||
#endif
|
||||
|
||||
#if OS_WIN || defined(SDL_VIDEO_DRIVER_X11) && !CONFIG2_GLES
|
||||
// Hack to stop things looking very ugly when scrolling in Atlas.
|
||||
ogl_SetVsyncEnabled(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!ogl_HaveVersion(2, 0)
|
||||
|| !ogl_HaveExtension("GL_ARB_vertex_buffer_object")
|
||||
|| ogl_HaveExtensions(0, "GL_ARB_multitexture", "GL_EXT_draw_range_elements", nullptr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue