summaryrefslogtreecommitdiff
path: root/src/render/openglx
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-13 18:40:11 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-13 18:40:11 +0300
commit55b1de961489f99723288e162f9d3a062d593368 (patch)
tree8e0420837f222828070fd7df010ede11c2ec90ed /src/render/openglx
parentbcbcdde49b5ff85c5ff4b8356dad475698d28f4e (diff)
downloadmanaverse-55b1de961489f99723288e162f9d3a062d593368.tar.gz
manaverse-55b1de961489f99723288e162f9d3a062d593368.tar.bz2
manaverse-55b1de961489f99723288e162f9d3a062d593368.tar.xz
manaverse-55b1de961489f99723288e162f9d3a062d593368.zip
Fix includes and update deheader ci script.
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);