mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
Fix Nvidia driver ignoring wglSwapIntervalEXT
This commit is contained in:
parent
9ab9548723
commit
2ac91f0c5a
2 changed files with 5 additions and 2 deletions
|
@ -94,6 +94,10 @@ CUSTOM_CVAR(Int, vid_hwgamma, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITC
|
|||
OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, int width, int height, int bits, int refreshHz, bool fullscreen) :
|
||||
Super(hMonitor, width, height, bits, refreshHz, fullscreen)
|
||||
{
|
||||
// SetVSync needs to be at the very top to workaround a bug in Nvidia's OpenGL driver.
|
||||
// If wglSwapIntervalEXT is called after glBindFramebuffer in a frame the setting is not changed!
|
||||
SetVSync(vid_vsync);
|
||||
|
||||
GLRenderer = new FGLRenderer(this);
|
||||
memcpy (SourcePalette, GPalette.BaseColors, sizeof(PalEntry)*256);
|
||||
UpdatePalette ();
|
||||
|
@ -107,7 +111,6 @@ OpenGLFrameBuffer::OpenGLFrameBuffer(void *hMonitor, int width, int height, int
|
|||
needsetgamma = true;
|
||||
swapped = false;
|
||||
Accel2D = true;
|
||||
SetVSync(vid_vsync);
|
||||
}
|
||||
|
||||
OpenGLFrameBuffer::~OpenGLFrameBuffer()
|
||||
|
|
|
@ -1141,7 +1141,7 @@ void Win32GLFrameBuffer::ReleaseResources ()
|
|||
|
||||
void Win32GLFrameBuffer::SetVSync (bool vsync)
|
||||
{
|
||||
if (vsyncfunc != NULL) vsyncfunc(vsync);
|
||||
if (vsyncfunc != NULL) vsyncfunc(vsync ? 1 : 0);
|
||||
}
|
||||
|
||||
void Win32GLFrameBuffer::SwapBuffers()
|
||||
|
|
Loading…
Reference in a new issue