changeset 1431:1eaf19af15bf

OpenGL: OS X does not seem to support debug output functionality
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 May 2020 21:14:35 +0200
parents 5128b448a6ee
children 758fb6958c20 8635b333fa5b
files Samples/Sdl/RtViewer/RtViewerSdl.cpp
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Samples/Sdl/RtViewer/RtViewerSdl.cpp	Fri May 15 18:03:20 2020 +0200
+++ b/Samples/Sdl/RtViewer/RtViewerSdl.cpp	Fri May 15 21:14:35 2020 +0200
@@ -44,11 +44,13 @@
 
 #include <string>
 
-#if !defined(GLAPIENTRY)
-// For OS X compatibility
-#  define GLAPIENTRY
-#endif
 
+#if !defined(__APPLE__)
+/**
+ * OpenGL: "OS X does not seem to support debug output functionality
+ * (as gathered online)."
+ * https://learnopengl.com/In-Practice/Debugging
+ **/
 static void GLAPIENTRY
 OpenGLMessageCallback(GLenum source,
                       GLenum type,
@@ -65,13 +67,16 @@
             type, severity, message);
   }
 }
+#endif
 
 namespace OrthancStone
 {
   void RtViewerView::EnableGLDebugOutput()
   {
+#if !defined(__APPLE__)
     glEnable(GL_DEBUG_OUTPUT);
     glDebugMessageCallback(OpenGLMessageCallback, 0);
+#endif
   }
 
   boost::shared_ptr<IViewport> RtViewerView::CreateViewport(const std::string& canvasId)