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 -2
View File
@@ -235,8 +235,7 @@ std::vector<Window::ContextAttribs> Window::getContextAttribsList() const
}
// Do we want a debug context?
const char *debughint = SDL_GetHint("LOVE_GRAPHICS_DEBUG");
bool debug = (debughint != nullptr && debughint[0] != '0');
bool debug = love::graphics::isDebugEnabled();
const char *preferGL2hint = SDL_GetHint("LOVE_GRAPHICS_USE_GL2");
bool preferGL2 = (preferGL2hint != nullptr && preferGL2hint[0] != '0');