mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Changed OpenGL debugging to a compile time option
This commit is contained in:
parent
5964aa8f76
commit
df2a32d4f0
1 changed files with 5 additions and 2 deletions
|
|
@ -81,8 +81,9 @@ int rgssThreadFun(void *userdata)
|
||||||
/* Setup GL context */
|
/* Setup GL context */
|
||||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||||
|
|
||||||
if (conf.debugMode)
|
#ifndef NDEBUG
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
|
||||||
|
#endif
|
||||||
|
|
||||||
glCtx = SDL_GL_CreateContext(win);
|
glCtx = SDL_GL_CreateContext(win);
|
||||||
|
|
||||||
|
|
@ -113,7 +114,9 @@ int rgssThreadFun(void *userdata)
|
||||||
bool vsync = conf.vsync || conf.syncToRefreshrate;
|
bool vsync = conf.vsync || conf.syncToRefreshrate;
|
||||||
SDL_GL_SetSwapInterval(vsync ? 1 : 0);
|
SDL_GL_SetSwapInterval(vsync ? 1 : 0);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
GLDebugLogger dLogger;
|
GLDebugLogger dLogger;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Setup AL context */
|
/* Setup AL context */
|
||||||
ALCcontext *alcCtx = alcCreateContext(threadData->alcDev, 0);
|
ALCcontext *alcCtx = alcCreateContext(threadData->alcDev, 0);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue