Only enable GL_BLEND when actually needed

This commit is contained in:
Kovid Goyal
2017-11-21 17:05:39 +05:30
parent 2bcbcfff44
commit bbc140e020
3 changed files with 4 additions and 6 deletions

View File

@@ -44,10 +44,9 @@ check_for_gl_error(const char *name, void UNUSED *funcptr, int UNUSED len_args,
}
}
static bool glad_loaded = false;
void
gl_init() {
static bool glad_loaded = false;
if (!glad_loaded) {
if (!init_glad((GLADloadproc) glfwGetProcAddress, global_state.debug_gl)) {
fatal("Loading the OpenGL library failed");
@@ -61,7 +60,6 @@ gl_init() {
#undef ARB_TEST
glad_loaded = true;
}
glEnable(GL_BLEND);
}
void