# HG changeset patch # User Sebastien Jodogne # Date 1589570075 -7200 # Node ID 1eaf19af15bfce6b87b8e566ae0323b21575f784 # Parent 5128b448a6ee92b5e357f017d6e6b258076fc825 OpenGL: OS X does not seem to support debug output functionality diff -r 5128b448a6ee -r 1eaf19af15bf Samples/Sdl/RtViewer/RtViewerSdl.cpp --- 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 -#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 RtViewerView::CreateViewport(const std::string& canvasId)