aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-05-17 19:09:41 +0200
committerArisotura <thetotalworm@gmail.com>2019-05-17 19:09:41 +0200
commit26f997172b0765cd807ebfb7c20993276fe871a4 (patch)
tree36f0cd2dca7ffdeddf828ed2eaedc498f82a25bc
parent8bf45571754a1469758f83ab8f98f951122c96f8 (diff)
fix 3D doublebuffering
-rw-r--r--src/GPU3D_OpenGL43.cpp5
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;
}
}