summaryrefslogtreecommitdiff
path: root/src/render/openglx
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/openglx')
-rw-r--r--src/render/openglx/mglx.cpp6
-rw-r--r--src/render/openglx/mglx.h4
-rw-r--r--src/render/openglx/mglx.hpp2
-rw-r--r--src/render/openglx/mglxinit.cpp4
-rw-r--r--src/render/openglx/mglxinit.h1
-rw-r--r--src/render/openglx/mglxtypes.h10
6 files changed, 10 insertions, 17 deletions
diff --git a/src/render/openglx/mglx.cpp b/src/render/openglx/mglx.cpp
index 8a2e2947b..4fdc85838 100644
--- a/src/render/openglx/mglx.cpp
+++ b/src/render/openglx/mglx.cpp
@@ -18,10 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "render/openglx/mglx.h"
-
#if defined(USE_OPENGL) && defined(USE_X11)
+#include "render/openglx/mglx.h"
+
#include "debug.h"
#define defName(name) name##_t m##name = nullptr
@@ -29,4 +29,6 @@
// include function defines
#include "render/openglx/mglx.hpp"
+MGLX_DEFINE
+
#endif
diff --git a/src/render/openglx/mglx.h b/src/render/openglx/mglx.h
index 1b95b0f90..b522f29b9 100644
--- a/src/render/openglx/mglx.h
+++ b/src/render/openglx/mglx.h
@@ -21,15 +21,15 @@
#ifndef RENDER_OPENGLX_MGLX_H
#define RENDER_OPENGLX_MGLX_H
-#include "main.h"
-
#if defined(USE_OPENGL) && defined(USE_X11)
#include "render/openglx/mglxtypes.h"
#define defName(name) extern name##_t m##name
#include "render/openglx/mglx.hpp"
+MGLX_DEFINE
#undef defName
+#undef MGLX_DEFINE
#endif // defined(USE_OPENGL) && defined(USE_X11)
#endif // RENDER_OPENGLX_MGLX_H
diff --git a/src/render/openglx/mglx.hpp b/src/render/openglx/mglx.hpp
index 21d5092e3..f663e4679 100644
--- a/src/render/openglx/mglx.hpp
+++ b/src/render/openglx/mglx.hpp
@@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define MGLX_DEFINE
+
defName(glXCreateContext);
defName(glXGetCurrentContext);
defName(glXCreateContextAttribs);
diff --git a/src/render/openglx/mglxinit.cpp b/src/render/openglx/mglxinit.cpp
index cb2652a07..ce40a6534 100644
--- a/src/render/openglx/mglxinit.cpp
+++ b/src/render/openglx/mglxinit.cpp
@@ -18,10 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "render/openglx/mglxinit.h"
-
#if defined(USE_OPENGL) && defined(USE_X11)
+#include "render/openglx/mglxinit.h"
+
#include "render/opengl/mglfunctions.h"
#include "render/openglx/mglx.h"
diff --git a/src/render/openglx/mglxinit.h b/src/render/openglx/mglxinit.h
index 553106445..de8e1086a 100644
--- a/src/render/openglx/mglxinit.h
+++ b/src/render/openglx/mglxinit.h
@@ -21,7 +21,6 @@
#ifndef RENDER_OPENGLX_MGLXINIT_H
#define RENDER_OPENGLX_MGLXINIT_H
-#include "main.h"
#if defined(USE_OPENGL) && defined(USE_X11)
namespace Glx
diff --git a/src/render/openglx/mglxtypes.h b/src/render/openglx/mglxtypes.h
index febb9eb5b..1d4064967 100644
--- a/src/render/openglx/mglxtypes.h
+++ b/src/render/openglx/mglxtypes.h
@@ -21,20 +21,10 @@
#ifndef RENDER_OPENGLX_MGLXTYPES_H
#define RENDER_OPENGLX_MGLXTYPES_H
-#include "main.h"
-
#if defined(USE_OPENGL) && defined(USE_X11)
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
#include <GL/glx.h>
-#if defined(__GXX_EXPERIMENTAL_CXX0X__)
-#include <cstdint>
-#else
-#include <stdint.h>
-#endif
-
typedef void *(*glXCreateContext_t) (Display *dpy, XVisualInfo *vis,
void *shareList, bool direct);
typedef void *(*glXGetCurrentContext_t) (void);