diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-10-17 02:24:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-10-17 14:55:08 +0300 |
commit | 5a322df4da3102ae0c8d3bc3071386dc5f21e580 (patch) | |
tree | 4ca0cca3328baf7484074ad6e1cf9c5a9f9e3db0 /src/graphicsmanager.cpp | |
parent | e6e36b25a696212f0262e3e5ef520543b1b3a58b (diff) | |
download | plus-5a322df4da3102ae0c8d3bc3071386dc5f21e580.tar.gz plus-5a322df4da3102ae0c8d3bc3071386dc5f21e580.tar.bz2 plus-5a322df4da3102ae0c8d3bc3071386dc5f21e580.tar.xz plus-5a322df4da3102ae0c8d3bc3071386dc5f21e580.zip |
Add OpenGL support for Android builds (partially).
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r-- | src/graphicsmanager.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index c69937073..a9efd8e13 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -21,11 +21,19 @@ #include "graphicsmanager.h" #ifdef USE_OPENGL + #ifndef WIN32 +#ifdef ANDROID +#include <GLES2/gl2.h> +#include <GLES/glext.h> +#include <EGL/egl.h> +#else #include "GL/glx.h" #endif #endif +#endif + #include "configuration.h" #include "graphics.h" #include "graphicsvertexes.h" @@ -53,6 +61,8 @@ #ifdef WIN32 #define getFunction(name) wglGetProcAddress(name) +#elif ANDROID +#define getFunction(name) eglGetProcAddress(name) #else #define getFunction(name) glXGetProcAddress(\ reinterpret_cast<const GLubyte*>(name)) |