summaryrefslogtreecommitdiffstats
path: root/unityplugin/UnityEmulator
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-22 02:53:29 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-22 02:53:29 +0000
commit0d1cf178c7703cae2fadc8291497b741a61ce934 (patch)
treea9586c0128ee0820c83594b2801fb63d556d1fbe /unityplugin/UnityEmulator
parentEnabled Linux build of samples (main() not yet implemented) (diff)
downloadDiligentEngine-0d1cf178c7703cae2fadc8291497b741a61ce934.tar.gz
DiligentEngine-0d1cf178c7703cae2fadc8291497b741a61ce934.zip
Updated path to glew to fix build error
Diffstat (limited to 'unityplugin/UnityEmulator')
-rw-r--r--unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h
index ec65625..293f21d 100644
--- a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h
+++ b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.h
@@ -4,13 +4,30 @@
#if OPENGL_SUPPORTED
-#ifndef GLEW_STATIC
-# define GLEW_STATIC
+#if defined(PLATFORM_WIN32)
+
+# ifndef GLEW_STATIC
+# define GLEW_STATIC
+# endif
+# include "GL/glew.h"
+# define NOMINMAX
+# include "GL/wglew.h"
+# include <GL/GL.h>
+
+#elif defined(PLATFORM_LINUX)
+
+# ifndef GLEW_STATIC
+# define GLEW_STATIC // Must be defined to use static version of glew
+# endif
+# ifndef GLEW_NO_GLU
+# define GLEW_NO_GLU
+# endif
+
+# include "GL/glew.h"
+
+#else
+# error Unsupported platform
#endif
-#include "glew.h"
-#define NOMINMAX
-#include "wglew.h"
-#include <GL/GL.h>
class UnityGraphicsGLCore_Impl
{