Only use opengl debug groups if the LOVE_GRAPHICS_DEBUG environment variable is set to 1.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-02-12 17:58:28 -04:00
parent df540cedea
commit 97789b18c0
6 changed files with 47 additions and 32 deletions
+1 -11
View File
@@ -272,17 +272,7 @@ bool Graphics::setMode(int width, int height, int pixelwidth, int pixelheight, b
else
setGammaCorrect(false);
bool enabledebug = false;
if (GLAD_VERSION_3_0)
{
// Enable OpenGL's debug output if a debug context has been created.
GLint flags = 0;
glGetIntegerv(GL_CONTEXT_FLAGS, &flags);
enabledebug = (flags & GL_CONTEXT_FLAG_DEBUG_BIT) != 0;
}
setDebug(enabledebug);
setDebug(isDebugEnabled());
if (streamBufferState.vb[0] == nullptr)
{