From dd0930d26586a30934839fa2e9f56e0a5bfc0b52 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 14 Dec 2017 10:30:55 +1100 Subject: [PATCH] [client] our source is vairable frame rate, we can't double buffer at all --- client/main.c | 2 ++ client/renderers/opengl.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/main.c b/client/main.c index 46ca6a80..79f935c7 100644 --- a/client/main.c +++ b/client/main.c @@ -661,6 +661,8 @@ int run() FcPatternDestroy(pat); } + SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0); + state.window = SDL_CreateWindow( "Looking Glass (Client)", params.center ? SDL_WINDOWPOS_CENTERED : params.x, diff --git a/client/renderers/opengl.c b/client/renderers/opengl.c index c6c7e9b0..b53a1dde 100644 --- a/client/renderers/opengl.c +++ b/client/renderers/opengl.c @@ -14,7 +14,7 @@ #include "memcpySSE.h" #include "utils.h" -#define BUFFER_COUNT 2 +#define BUFFER_COUNT 1 #define FRAME_TEXTURE 0 #define FPS_TEXTURE 1 @@ -125,7 +125,6 @@ bool lgr_opengl_initialize(void ** opaque, const LG_RendererParams params, const } SDL_GL_SetSwapInterval(0); - glDrawBuffer(GL_FRONT); // check if the GPU supports GL_ARB_buffer_storage first // there is no advantage to this renderer if it is not present. @@ -645,7 +644,6 @@ bool lgr_opengl_render(void * opaque) lgr_opengl_draw_mouse(this); if (this->fpsTexture) glCallList(this->fpsList); - glFlush(); ++this->frameCount;