mask fade/feather rounding problem, mask mode sense err, add mask
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bcwindow3d.C
index 902f65e9b17263b95f4f3ca87f7dc800724700d9..d68e935415dd5e4a1f912003df42a8bdc25d3268 100644 (file)
@@ -192,9 +192,30 @@ bool BC_WindowBase::glx_make_current(GLXDrawable draw, GLXContext glx_ctxt)
        return glXMakeContextCurrent(get_display(), draw, draw, glx_ctxt);
 }
 
+//#define GL_BUG
+#ifdef GL_BUG
+static void GLAPIENTRY glDebugCallback(GLenum source, GLenum type,
+       GLuint id, GLenum severity, GLsizei length, const GLchar* message,
+       const void* userParam)
+{
+       fprintf(stderr, "GL CALLBACK: %s type = 0x%x, severity = 0x%x, message = %s\n",
+               ( type == GL_DEBUG_TYPE_ERROR ? "** GL ERROR **" : "" ),
+               type, severity, message );
+}
+#endif
+
 bool BC_WindowBase::glx_make_current(GLXDrawable draw)
 {
-       return glx_make_current(draw, glx_win_context);
+       bool ret = glx_make_current(draw, glx_win_context);
+#ifdef GL_BUG
+       //Enabling OpenGL debug output
+       glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, 0, GL_TRUE);
+       glEnable(GL_DEBUG_OUTPUT);
+       glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
+       glDebugMessageCallback(glDebugCallback, 0);
+       glEnable(GL_DEBUG_OUTPUT);
+#endif
+       return ret;
 }
 
 #endif