changeset 581:d933fc19214a

fix windows build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Apr 2019 16:17:13 +0200
parents 2faf9b53d6d9
children e36e69a380a5
files Framework/OpenGL/IOpenGLContext.h Framework/OpenGL/OpenGLProgram.h Framework/OpenGL/OpenGLShader.h Framework/OpenGL/OpenGLTexture.h
diffstat 4 files changed, 24 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/OpenGL/IOpenGLContext.h	Fri Apr 19 16:10:27 2019 +0200
+++ b/Framework/OpenGL/IOpenGLContext.h	Fri Apr 19 16:17:13 2019 +0200
@@ -21,18 +21,8 @@
 
 #pragma once
 
-#if !defined(ORTHANC_ENABLE_OPENGL)
-#  error The macro ORTHANC_ENABLE_OPENGL must be defined
-#endif
-
-#if ORTHANC_ENABLE_OPENGL != 1
-#  error Support for OpenGL is disabled
-#endif
-
-
 #include <boost/noncopyable.hpp>
 
-
 namespace OrthancStone
 {
   namespace OpenGL
--- a/Framework/OpenGL/OpenGLProgram.h	Fri Apr 19 16:10:27 2019 +0200
+++ b/Framework/OpenGL/OpenGLProgram.h	Fri Apr 19 16:17:13 2019 +0200
@@ -29,8 +29,15 @@
 #  error Support for OpenGL is disabled
 #endif
 
+#if defined(__APPLE__)
+#  include <OpenGL/gl.h>
+#  include <OpenGL/glext.h>
+#else
+#  include <GL/gl.h>
+#  include <GL/glext.h>
+#endif
+
 #include <string>
-#include <GL/gl.h>
 #include <boost/noncopyable.hpp>
 
 namespace OrthancStone
--- a/Framework/OpenGL/OpenGLShader.h	Fri Apr 19 16:10:27 2019 +0200
+++ b/Framework/OpenGL/OpenGLShader.h	Fri Apr 19 16:17:13 2019 +0200
@@ -29,8 +29,15 @@
 #  error Support for OpenGL is disabled
 #endif
 
+#if defined(__APPLE__)
+#  include <OpenGL/gl.h>
+#  include <OpenGL/glext.h>
+#else
+#  include <GL/gl.h>
+#  include <GL/glext.h>
+#endif
+
 #include <string>
-#include <GL/gl.h>
 #include <boost/noncopyable.hpp>
 
 namespace OrthancStone
--- a/Framework/OpenGL/OpenGLTexture.h	Fri Apr 19 16:10:27 2019 +0200
+++ b/Framework/OpenGL/OpenGLTexture.h	Fri Apr 19 16:17:13 2019 +0200
@@ -29,9 +29,16 @@
 #  error Support for OpenGL is disabled
 #endif
 
+#if defined(__APPLE__)
+#  include <OpenGL/gl.h>
+#  include <OpenGL/glext.h>
+#else
+#  include <GL/gl.h>
+#  include <GL/glext.h>
+#endif
+
 #include <Core/Images/ImageAccessor.h>
 
-#include <GL/gl.h>
 #include <boost/noncopyable.hpp>