summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/mglx.cpp9
-rw-r--r--src/render/mglx.h14
-rw-r--r--src/render/mglx.hpp27
3 files changed, 31 insertions, 19 deletions
diff --git a/src/render/mglx.cpp b/src/render/mglx.cpp
index b5390fb11..694bdbb6f 100644
--- a/src/render/mglx.cpp
+++ b/src/render/mglx.cpp
@@ -25,13 +25,6 @@
#include "debug.h"
#define defName(name) name##_t m##name = nullptr
-
-defName(glXCreateContext);
-defName(glXGetCurrentContext);
-defName(glXCreateContextAttribs);
-defName(glXChooseFBConfig);
-defName(glXDestroyContext);
-defName(glXMakeCurrent);
-defName(glXSwapBuffers);
+#include "render/mglx.hpp"
#endif
diff --git a/src/render/mglx.h b/src/render/mglx.h
index d0a626b9a..72777489c 100644
--- a/src/render/mglx.h
+++ b/src/render/mglx.h
@@ -26,17 +26,9 @@
#include "render/mglxtypes.h"
-#define defNameE(name) extern name##_t m##name
-
-defNameE(glXCreateContext);
-defNameE(glXGetCurrentContext);
-defNameE(glXCreateContextAttribs);
-defNameE(glXChooseFBConfig);
-defNameE(glXDestroyContext);
-defNameE(glXMakeCurrent);
-defNameE(glXSwapBuffers);
-
-#undef defNameE
+#define defName(name) extern name##_t m##name
+#include "render/mglx.hpp"
+#undef defName
#endif // defined(USE_OPENGL) && defined(USE_X11)
#endif // RENDER_MGLX_H
diff --git a/src/render/mglx.hpp b/src/render/mglx.hpp
new file mode 100644
index 000000000..abc06d9a1
--- /dev/null
+++ b/src/render/mglx.hpp
@@ -0,0 +1,27 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2014 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+defName(glXCreateContext);
+defName(glXGetCurrentContext);
+defName(glXCreateContextAttribs);
+defName(glXChooseFBConfig);
+defName(glXDestroyContext);
+defName(glXMakeCurrent);
+defName(glXSwapBuffers);