diff --git a/gfx/context/glx_ctx.c b/gfx/context/glx_ctx.c index c749069d27..c2b03c28ca 100644 --- a/gfx/context/glx_ctx.c +++ b/gfx/context/glx_ctx.c @@ -352,7 +352,7 @@ static bool gfx_ctx_glx_init(void *data) glx_create_context_attribs = (glXCreateContextAttribsARBProc)glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB"); #ifdef GL_DEBUG - g_debug = true; + glx->g_debug = true; #else glx->g_debug = g_extern.system.hw_render_callback.debug_context; #endif diff --git a/gfx/gl.c b/gfx/gl.c index 3e3f58c49f..070348f272 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -44,6 +44,10 @@ #include "shader/shader_glsl.h" #endif +#ifdef GL_DEBUG +#include +#endif + #include "shader/shader_context.h" /* Used for the last pass when rendering to the back buffer. */