diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-10 13:22:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-10 13:22:43 +0300 |
commit | 7ad652a0c4d70e7bbca309dd7a1d0b824b6f5efa (patch) | |
tree | 080f86218f6deb792df49678137070689d808bfe /src/render | |
parent | df56c8f79f51cf3ea5118b2e8b82930cd71c2679 (diff) | |
download | manaplus-7ad652a0c4d70e7bbca309dd7a1d0b824b6f5efa.tar.gz manaplus-7ad652a0c4d70e7bbca309dd7a1d0b824b6f5efa.tar.bz2 manaplus-7ad652a0c4d70e7bbca309dd7a1d0b824b6f5efa.tar.xz manaplus-7ad652a0c4d70e7bbca309dd7a1d0b824b6f5efa.zip |
Simplify GLX functions defenition.
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/mglx.cpp | 9 | ||||
-rw-r--r-- | src/render/mglx.h | 14 | ||||
-rw-r--r-- | src/render/mglx.hpp | 27 |
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); |