changeset 853:bb88686acecc

fix OS X build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Jun 2019 12:30:20 +0200
parents 6d15261f9c99
children 41d22389a7d2
files Applications/Generic/GuiAdapter.cpp
diffstat 1 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Generic/GuiAdapter.cpp	Tue Jun 18 16:45:37 2019 +0200
+++ b/Applications/Generic/GuiAdapter.cpp	Wed Jun 19 12:30:20 2019 +0200
@@ -20,17 +20,18 @@
 
 #include "GuiAdapter.h"
 
-#if ORTHANC_ENABLE_SDL == 1
-# if ORTHANC_ENABLE_OPENGL == 1
-#   include "../../Framework/OpenGL/OpenGLIncludes.h"
-#   include <SDL_video.h>
-#   include <SDL_render.h>
-#   include <SDL.h>
-# endif
-#endif
+#if ORTHANC_ENABLE_OPENGL == 1
+#  include "../../Framework/OpenGL/OpenGLIncludes.h"
+#endif
+
+#if ORTHANC_ENABLE_SDL == 1
+#  include <SDL_video.h>
+#  include <SDL_render.h>
+#  include <SDL.h>
+#endif
 
 #if ORTHANC_ENABLE_THREADS == 1
-# include "../../Framework/Messages/LockingEmitter.h"
+#  include "../../Framework/Messages/LockingEmitter.h"
 #endif
 
 namespace OrthancStone
@@ -505,7 +506,7 @@
     animationFrameHandlers_.push_back(std::make_pair(func, userData));
   }
 
-# if ORTHANC_ENABLE_OPENGL == 1
+# if ORTHANC_ENABLE_OPENGL == 1 && !defined(__APPLE__)   /* OpenGL debug is not available on OS X */
 
   static void GLAPIENTRY
     OpenGLMessageCallback(GLenum source,
@@ -527,7 +528,7 @@
 
   void GuiAdapter::Run()
   {
-# if ORTHANC_ENABLE_OPENGL == 1
+# if ORTHANC_ENABLE_OPENGL == 1 && !defined(__APPLE__)
     glEnable(GL_DEBUG_OUTPUT);
     glDebugMessageCallback(OpenGLMessageCallback, 0);
 # endif