diff options
author | Arisotura <thetotalworm@gmail.com> | 2019-05-17 19:09:41 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2019-05-17 19:09:41 +0200 |
commit | 26f997172b0765cd807ebfb7c20993276fe871a4 (patch) | |
tree | 36f0cd2dca7ffdeddf828ed2eaedc498f82a25bc | |
parent | 8bf45571754a1469758f83ab8f98f951122c96f8 (diff) |
fix 3D doublebuffering
-rw-r--r-- | src/GPU3D_OpenGL43.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/GPU3D_OpenGL43.cpp b/src/GPU3D_OpenGL43.cpp index 0181192..062e40e 100644 --- a/src/GPU3D_OpenGL43.cpp +++ b/src/GPU3D_OpenGL43.cpp @@ -774,8 +774,8 @@ void RenderFrame() if (Accelerated) { - int backbuf = FrontBuffer ? 0 : 1; - glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, FramebufferTex[backbuf], 0); + glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, FramebufferTex[FrontBuffer], 0); + FrontBuffer = FrontBuffer ? 0 : 1; } // clear buffers @@ -891,7 +891,6 @@ u32* GetLine(int line) void SetupAccelFrame() { glBindTexture(GL_TEXTURE_2D, FramebufferTex[FrontBuffer]); - FrontBuffer = FrontBuffer ? 0 : 1; } } |