aboutsummaryrefslogtreecommitdiff
path: root/Gem/develop
diff options
context:
space:
mode:
Diffstat (limited to 'Gem/develop')
-rw-r--r--Gem/develop/include/Gem/Gem/GemGL.h16
-rw-r--r--Gem/develop/include/Gem/Utils/GLUtil.h4
2 files changed, 19 insertions, 1 deletions
diff --git a/Gem/develop/include/Gem/Gem/GemGL.h b/Gem/develop/include/Gem/Gem/GemGL.h
index a009928..ef3b250 100644
--- a/Gem/develop/include/Gem/Gem/GemGL.h
+++ b/Gem/develop/include/Gem/Gem/GemGL.h
@@ -32,10 +32,18 @@
# define GLEW_MX
#endif
-#include "Gem/glew.h"
+#ifdef __EMSCRIPTEN__
+# include <GL/glew.h>
+# include <SDL/SDL_opengl.h>
+# include <GL/gl.h>
+# include <GL/glu.h>
+#else
+# include "Gem/glew.h"
+#endif
#ifdef __APPLE__
# include <OpenGL/OpenGL.h>
+#elif defined(__EMSCRIPTEN__)
#elif defined _WIN32
# include "Gem/wglew.h"
#elif defined(__linux__) || defined(__FreeBSD_kernel__)
@@ -86,4 +94,10 @@ GEM_EXTERN GLXEWContext*glxewGetContext(void);
# endif
#endif
+
+// missing from Emscripten's glew implementation
+#ifndef GL_TEXTURE_RECTANGLE_EXT
+# define GL_TEXTURE_RECTANGLE_EXT 0x84F5
+#endif
+
#endif /* _INCLUDE__GEM_GEM_GEMGL_H_ */
diff --git a/Gem/develop/include/Gem/Utils/GLUtil.h b/Gem/develop/include/Gem/Utils/GLUtil.h
index 7dad69d..fb15b25 100644
--- a/Gem/develop/include/Gem/Utils/GLUtil.h
+++ b/Gem/develop/include/Gem/Utils/GLUtil.h
@@ -26,7 +26,11 @@ struct _symbol;
#include <string>
/* for GLenum */
+#ifdef __EMSCRIPTEN__
+#include "Gem/glew.h"
+#else
#include "Gem/GemGL.h"
+#endif
#include "Gem/Exception.h"