summaryrefslogtreecommitdiff
path: root/src/graphicsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-23 19:10:33 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-23 19:11:51 +0300
commit7f8227ad083ba3973e345efc7a23ee4b64059112 (patch)
tree9a6e42c08833adb465e5f989db6023eadc27e799 /src/graphicsmanager.cpp
parentb23c9675371a77b634efab0e744a0373990614a1 (diff)
downloadplus-7f8227ad083ba3973e345efc7a23ee4b64059112.tar.gz
plus-7f8227ad083ba3973e345efc7a23ee4b64059112.tar.bz2
plus-7f8227ad083ba3973e345efc7a23ee4b64059112.tar.xz
plus-7f8227ad083ba3973e345efc7a23ee4b64059112.zip
Add glx functions helpers.
Add some glx functions.
Diffstat (limited to 'src/graphicsmanager.cpp')
-rw-r--r--src/graphicsmanager.cpp33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 241a9c438..696c0fb77 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -23,20 +23,20 @@
#ifdef USE_OPENGL
#ifndef WIN32
+
#ifdef ANDROID
#include <GLES2/gl2.h>
#include <GLES/glext.h>
#include <EGL/egl.h>
#ifndef USE_SDL2
#include <SDL_android.h>
-#endif
-#else
+#endif // USE_SDL2
+#else // ANDROID
#include <GL/glx.h>
+#endif // ANDROID
+#else // WIN32
#endif
-#else
-#endif
-
-#endif
+#endif // USE_OPENGL
#include "configuration.h"
#include "logger.h"
@@ -56,6 +56,8 @@
#include "resources/openglimagehelper.h"
#include "resources/sdlimagehelper.h"
+#include "render/mglfunctions.h"
+
#ifdef USE_SDL2
#include "render/sdl2softwaregraphics.h"
@@ -77,25 +79,6 @@
#ifndef GL_MAX_RENDERBUFFER_SIZE
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
#endif
-
-#ifdef WIN32
-#define getFunction(name) wglGetProcAddress(name)
-#elif defined ANDROID
-#define getFunction(name) eglGetProcAddress(name)
-#elif defined __APPLE__
-#define getFunction(name) nullptr
-#else
-#define getFunction(name) glXGetProcAddress(\
- reinterpret_cast<const GLubyte*>(name))
-#endif
-
-#define assignFunction(func, name) m##func \
- = reinterpret_cast<func##_t>(getFunction(name)); \
- if (m##func == nullptr) \
- logger->log(std::string("function not found: ") + name); \
- else \
- logger->log(std::string("assigned function: ") + name);
-
#endif
GraphicsManager graphicsManager;