From fcdce6d72f97d4749c0f120e22e8be00e88ebc6e Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Thu, 17 Mar 2016 16:17:17 +0100 Subject: [PATCH] fix direct rendering --- src/app/init.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/init.cpp b/src/app/init.cpp index a0ea7b5..fea5653 100644 --- a/src/app/init.cpp +++ b/src/app/init.cpp @@ -157,9 +157,9 @@ InitGL::InitGL(bool double_buffer, int sample_size) { throw SDLError("SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE)"); } - if (double_buffer) { - if (SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1) != 0) { - throw SDLError("SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1)"); + if (!double_buffer) { + if (SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0) != 0) { + throw SDLError("SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0)"); } } -- 2.39.2