Don't create debug GL contexts in release builds

This commit is contained in:
baldurk
2016-09-28 13:15:15 +02:00
parent 6f24ed7cca
commit 31a271b1f7
3 changed files with 18 additions and 0 deletions
+2
View File
@@ -758,7 +758,9 @@ WrappedOpenGL::WrappedOpenGL(const char *logfile, const GLHookSet &funcs) : m_Re
if(m_Real.glDebugMessageCallback)
{
m_Real.glDebugMessageCallback(&DebugSnoopStatic, this);
#if !defined(RELEASE)
m_Real.glEnable(eGL_DEBUG_OUTPUT_SYNCHRONOUS);
#endif
}
}
else
+8
View File
@@ -152,7 +152,11 @@ uint64_t GLReplay::MakeOutputWindow(WindowingSystem system, void *data, bool dep
attribs[i++] = GLX_CONTEXT_MINOR_VERSION_ARB;
attribs[i++] = 3;
attribs[i++] = GLX_CONTEXT_FLAGS_ARB;
#if defined(_RELEASE)
attribs[i++] = 0;
#else
attribs[i++] = GLX_CONTEXT_DEBUG_BIT_ARB;
#endif
attribs[i++] = GLX_CONTEXT_PROFILE_MASK_ARB;
attribs[i++] = GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
@@ -302,7 +306,11 @@ ReplayCreateStatus GL_CreateReplayDevice(const char *logfile, IReplayDriver **dr
attribs[i++] = GLX_CONTEXT_MINOR_VERSION_ARB;
attribs[i++] = 3;
attribs[i++] = GLX_CONTEXT_FLAGS_ARB;
#if defined(_RELEASE)
attribs[i++] = 0;
#else
attribs[i++] = GLX_CONTEXT_DEBUG_BIT_ARB;
#endif
attribs[i++] = GLX_CONTEXT_PROFILE_MASK_ARB;
attribs[i++] = GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
+8
View File
@@ -169,7 +169,11 @@ uint64_t GLReplay::MakeOutputWindow(WindowingSystem system, void *data, bool dep
attribs[i++] = WGL_CONTEXT_MINOR_VERSION_ARB;
attribs[i++] = 3;
attribs[i++] = WGL_CONTEXT_FLAGS_ARB;
#if defined(_RELEASE)
attribs[i++] = 0;
#else
attribs[i++] = WGL_CONTEXT_DEBUG_BIT_ARB;
#endif
attribs[i++] = WGL_CONTEXT_PROFILE_MASK_ARB;
attribs[i++] = WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
@@ -402,7 +406,11 @@ ReplayCreateStatus GL_CreateReplayDevice(const char *logfile, IReplayDriver **dr
attribs[i++] = WGL_CONTEXT_MINOR_VERSION_ARB;
attribs[i++] = 3;
attribs[i++] = WGL_CONTEXT_FLAGS_ARB;
#if defined(_RELEASE)
attribs[i++] = 0;
#else
attribs[i++] = WGL_CONTEXT_DEBUG_BIT_ARB;
#endif
attribs[i++] = WGL_CONTEXT_PROFILE_MASK_ARB;
attribs[i++] = WGL_CONTEXT_CORE_PROFILE_BIT_ARB;