ecere/gfx/drivers/OpenGL: Fixed warnings
[sdk] / ecere / src / gfx / drivers / OpenGLDisplayDriver.ec
index 3cf9cda..5baefff 100644 (file)
@@ -563,7 +563,11 @@ class OGLDisplay : struct
    int x, y;
 };
 
-#ifdef _DEBUG
+#if defined(_DEBUG) && !defined(__ANDROID__) && !defined(__EMSCRIPTEN__) && !defined(__ODROID__)
+//#define GL_DEBUGGING
+#endif
+
+#ifdef GL_DEBUGGING
 static void APIENTRY openglCallbackFunction(GLenum source,
                                            GLenum type,
                                            GLuint id,
@@ -647,8 +651,7 @@ class OGLIndices : struct
 int current;
 void * previous;
 
-#if !defined(__ANDROID__) && !defined(__EMSCRIPTEN__) && !defined(__ODROID__)
-#ifdef _DEBUG
+#ifdef GL_DEBUGGING
 static void setupDebugging()
 {
    if(glDebugMessageCallback)
@@ -656,7 +659,7 @@ static void setupDebugging()
       GLuint unusedIds = 0;
 
       glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
-      /*
+
       glDebugMessageCallback(openglCallbackFunction, null);
       glDebugMessageControl(GL_DONT_CARE,
           GL_DONT_CARE,
@@ -664,11 +667,9 @@ static void setupDebugging()
           0,
           &unusedIds,
           GL_TRUE);
-      */
    }
 }
 #endif
-#endif
 
 #if defined(__WIN32__)
 static HGLRC winCreateContext(HDC hdc)
@@ -1286,7 +1287,7 @@ class OpenGLDisplayDriver : DisplayDriver
          PrintLn("vboAvailable is: ", vboAvailable);
 #endif
 
-#  ifdef _DEBUG
+#  ifdef GL_DEBUGGING
          setupDebugging();
 #  endif