From 1a21baa93fd555e25b95732590282ba9a63dea86 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 1 Dec 2015 20:48:52 +0300 Subject: Fix compilation nacl with OpenGL (regal). --- src/render/mglfunctions.h | 2 ++ src/render/mgltypes.h | 4 ++++ src/render/mobileopenglgraphics.h | 2 ++ src/render/modernopenglgraphics.h | 2 ++ src/render/normalopenglgraphics.h | 2 ++ src/render/nullopenglgraphics.h | 2 ++ src/render/safeopenglgraphics.h | 2 ++ 7 files changed, 16 insertions(+) (limited to 'src/render') diff --git a/src/render/mglfunctions.h b/src/render/mglfunctions.h index 8be722b98..cc9c95c6f 100644 --- a/src/render/mglfunctions.h +++ b/src/render/mglfunctions.h @@ -31,6 +31,8 @@ #define getFunction(name) eglGetProcAddress(name) #elif defined __APPLE__ #define getFunction(name) nullptr +#elif defined __native_client__ +#define getFunction(name) SDL_GL_GetProcAddress(name) #else #define getFunction(name) glXGetProcAddress(\ reinterpret_cast(name)) diff --git a/src/render/mgltypes.h b/src/render/mgltypes.h index 330524232..5d033abf3 100644 --- a/src/render/mgltypes.h +++ b/src/render/mgltypes.h @@ -36,8 +36,12 @@ #define GL_GLEXT_PROTOTYPES 1 #endif #include +#ifdef __native_client__ +#include +#else #include #endif +#endif #if defined(__GXX_EXPERIMENTAL_CXX0X__) #include diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h index 16442bbc3..6ae2c4d08 100644 --- a/src/render/mobileopenglgraphics.h +++ b/src/render/mobileopenglgraphics.h @@ -39,8 +39,10 @@ #define GL_GLEXT_PROTOTYPES 1 #endif #include +#ifndef __native_client__ #include #endif +#endif class OpenGLGraphicsVertexes; diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h index 792c4224c..b1ee15a8f 100644 --- a/src/render/modernopenglgraphics.h +++ b/src/render/modernopenglgraphics.h @@ -39,8 +39,10 @@ #define GL_GLEXT_PROTOTYPES 1 #endif #include +#ifndef __native_client__ #include #endif +#endif class OpenGLGraphicsVertexes; class ShaderProgram; diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h index 54ab4df99..7d73223b6 100644 --- a/src/render/normalopenglgraphics.h +++ b/src/render/normalopenglgraphics.h @@ -39,8 +39,10 @@ #define GL_GLEXT_PROTOTYPES 1 #endif #include +#ifndef __native_client__ #include #endif +#endif class OpenGLGraphicsVertexes; diff --git a/src/render/nullopenglgraphics.h b/src/render/nullopenglgraphics.h index 10853adec..abd73a117 100644 --- a/src/render/nullopenglgraphics.h +++ b/src/render/nullopenglgraphics.h @@ -39,8 +39,10 @@ #define GL_GLEXT_PROTOTYPES 1 #endif #include +#ifndef __native_client__ #include #endif +#endif class OpenGLGraphicsVertexes; diff --git a/src/render/safeopenglgraphics.h b/src/render/safeopenglgraphics.h index 440ba7a39..8a162e8d6 100644 --- a/src/render/safeopenglgraphics.h +++ b/src/render/safeopenglgraphics.h @@ -37,8 +37,10 @@ #define GL_GLEXT_PROTOTYPES 1 #endif #include +#ifndef __native_client__ #include #endif +#endif class SafeOpenGLGraphics final : public Graphics { -- cgit v1.2.3-70-g09d2