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
+2 -19
View File
@@ -101,25 +101,8 @@ public:
{
public:
TempDebugGroup(const char *name)
{
if (GLAD_VERSION_4_3 || (GLAD_KHR_debug && !GLAD_ES_VERSION_2_0))
glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, 0, (const GLchar *) name);
else if (GLAD_ES_VERSION_2_0 && GLAD_KHR_debug)
glPushDebugGroupKHR(GL_DEBUG_SOURCE_APPLICATION, 0, 0, (const GLchar *) name);
else if (GLAD_EXT_debug_marker)
glPushGroupMarkerEXT(0, (const GLchar *) name);
}
~TempDebugGroup()
{
if (GLAD_VERSION_4_3 || (GLAD_KHR_debug && !GLAD_ES_VERSION_2_0))
glPopDebugGroup();
else if (GLAD_ES_VERSION_2_0 && GLAD_KHR_debug)
glPopDebugGroupKHR();
else if (GLAD_EXT_debug_marker)
glPopGroupMarkerEXT();
}
TempDebugGroup(const char *name);
~TempDebugGroup();
};
struct Stats