From df2a32d4f0f27570a5bd7f29aa6f52d9717742dc Mon Sep 17 00:00:00 2001 From: Mathew Velasquez Date: Fri, 26 Feb 2016 18:33:22 -0500 Subject: [PATCH] Changed OpenGL debugging to a compile time option --- src/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 23f2b8c..17d108d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -81,8 +81,9 @@ int rgssThreadFun(void *userdata) /* Setup GL context */ SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); - if (conf.debugMode) - SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG); +#ifndef NDEBUG + SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG); +#endif glCtx = SDL_GL_CreateContext(win); @@ -113,7 +114,9 @@ int rgssThreadFun(void *userdata) bool vsync = conf.vsync || conf.syncToRefreshrate; SDL_GL_SetSwapInterval(vsync ? 1 : 0); +#ifndef NDEBUG GLDebugLogger dLogger; +#endif /* Setup AL context */ ALCcontext *alcCtx = alcCreateContext(threadData->alcDev, 0);