diff --git a/src/framework/graphics/graphics.cpp b/src/framework/graphics/graphics.cpp index bda68b87..fdae31e9 100644 --- a/src/framework/graphics/graphics.cpp +++ b/src/framework/graphics/graphics.cpp @@ -45,7 +45,7 @@ void Graphics::init() if(err != GLEW_OK) logFatal("Unable to init GLEW: ", glewGetErrorString(err)); -#ifndef NDEBUG +#ifdef DEBUG_OPENGL if(GLEW_ARB_debug_output) glDebugMessageCallbackARB(oglDebugCallback, NULL); #endif diff --git a/src/framework/platform/x11window.cpp b/src/framework/platform/x11window.cpp index 29ee8c0c..492049c6 100644 --- a/src/framework/platform/x11window.cpp +++ b/src/framework/platform/x11window.cpp @@ -368,8 +368,9 @@ void X11Window::internalChooseGLVisual() #ifndef OPENGL_ES2 static int attrList[] = { GLX_RENDER_TYPE, GLX_RGBA_BIT, - GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, GLX_DOUBLEBUFFER, True, + //GLX_DEPTH_SIZE, 24, + //GLX_STENCIL_SIZE, 8, None }; @@ -404,18 +405,18 @@ void X11Window::internalChooseGLVisual() void X11Window::internalCreateGLContext() { #ifndef OPENGL_ES2 +#ifdef DEBUG_OPENGL typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display*, GLXFBConfig, GLXContext, Bool, const int*); GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = NULL; glXCreateContextAttribsARB = (GLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((const GLubyte*) "glXCreateContextAttribsARB"); if(glXCreateContextAttribsARB) { int attrs[] = { -#ifndef NDEBUG GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_DEBUG_BIT_ARB, -#endif None }; m_glxContext = glXCreateContextAttribsARB(m_display, *m_fbConfig, NULL, True, attrs); } else +#endif m_glxContext = glXCreateContext(m_display, m_visual, NULL, True); //m_glxContext = glXCreateContext(m_display, m_visual, NULL, True);