From 26f997172b0765cd807ebfb7c20993276fe871a4 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Fri, 17 May 2019 19:09:41 +0200 Subject: fix 3D doublebuffering --- src/GPU3D_OpenGL43.cpp | 5 ++--- 1 file 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; } } -- cgit v1.2.3