diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-13 18:40:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-13 18:40:11 +0300 |
commit | 55b1de961489f99723288e162f9d3a062d593368 (patch) | |
tree | 8e0420837f222828070fd7df010ede11c2ec90ed /src/render | |
parent | bcbcdde49b5ff85c5ff4b8356dad475698d28f4e (diff) | |
download | mv-55b1de961489f99723288e162f9d3a062d593368.tar.gz mv-55b1de961489f99723288e162f9d3a062d593368.tar.bz2 mv-55b1de961489f99723288e162f9d3a062d593368.tar.xz mv-55b1de961489f99723288e162f9d3a062d593368.zip |
Fix includes and update deheader ci script.
Diffstat (limited to 'src/render')
29 files changed, 36 insertions, 43 deletions
diff --git a/src/render/graphics.h b/src/render/graphics.h index dda3363e6..8fb13c804 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -67,7 +67,6 @@ #define RENDER_GRAPHICS_H #include "sdlshared.h" -#include "main.h" #include "enums/render/rendertype.h" diff --git a/src/render/imagegraphics.cpp b/src/render/imagegraphics.cpp index 569adee44..96c44dd7f 100644 --- a/src/render/imagegraphics.cpp +++ b/src/render/imagegraphics.cpp @@ -24,8 +24,6 @@ #include "render/imagegraphics.h" -#include "main.h" - #include "debug.h" ImegeGraphics::ImegeGraphics() : diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp index 20951d4e4..163185bb6 100644 --- a/src/render/mobileopengl2graphics.cpp +++ b/src/render/mobileopengl2graphics.cpp @@ -25,7 +25,6 @@ #include "render/mobileopengl2graphics.h" #include "graphicsmanager.h" -#include "logger.h" #include "render/opengl/mgl.h" #ifdef __native_client__ @@ -43,7 +42,6 @@ #include "utils/delete2.h" #include "utils/sdlcheckutils.h" -#include "utils/sdlhelper.h" #include "debug.h" diff --git a/src/render/mobileopengl2graphics.h b/src/render/mobileopengl2graphics.h index d1b5b96a5..51a5d57ca 100644 --- a/src/render/mobileopengl2graphics.h +++ b/src/render/mobileopengl2graphics.h @@ -26,6 +26,7 @@ #if defined USE_OPENGL && !defined ANDROID #include "localconsts.h" + #include "render/graphics.h" #include "resources/fboinfo.h" diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp index dac566822..64f01b8b3 100644 --- a/src/render/mobileopenglgraphics.cpp +++ b/src/render/mobileopenglgraphics.cpp @@ -24,8 +24,6 @@ #include "render/mobileopenglgraphics.h" -#include "logger.h" - #include "render/opengl/mgl.h" #ifdef __native_client__ #include "render/opengl/naclglfunctions.h" diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h index 7f14fc6f8..8a9341208 100644 --- a/src/render/mobileopenglgraphics.h +++ b/src/render/mobileopenglgraphics.h @@ -26,6 +26,7 @@ #if defined(USE_OPENGL) && !defined(__native_client__) #include "localconsts.h" + #include "render/graphics.h" #include "resources/fboinfo.h" diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp index 6eb98601a..458a9a9f7 100644 --- a/src/render/modernopenglgraphics.cpp +++ b/src/render/modernopenglgraphics.cpp @@ -25,7 +25,6 @@ #include "render/modernopenglgraphics.h" #include "graphicsmanager.h" -#include "logger.h" #include "render/opengl/mgl.h" #ifdef __native_client__ diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h index 2776cc1fb..430f90249 100644 --- a/src/render/modernopenglgraphics.h +++ b/src/render/modernopenglgraphics.h @@ -26,6 +26,7 @@ #if defined(USE_OPENGL) && !defined(ANDROID) && !defined(__native_client__) #include "localconsts.h" + #include "render/graphics.h" #include "resources/fboinfo.h" diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp index 22aef9cda..3a2bfde49 100644 --- a/src/render/normalopenglgraphics.cpp +++ b/src/render/normalopenglgraphics.cpp @@ -24,9 +24,9 @@ #include "render/normalopenglgraphics.h" -#include "logger.h" - +#ifdef DEBUG_OPENGL #include "render/opengl/mgl.h" +#endif // DEBUG_OPENGL #include "render/vertexes/imagecollection.h" diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h index 3c2e0baf9..4bd02de51 100644 --- a/src/render/normalopenglgraphics.h +++ b/src/render/normalopenglgraphics.h @@ -26,6 +26,7 @@ #if defined USE_OPENGL && !defined ANDROID && !defined(__native_client__) #include "localconsts.h" + #include "render/graphics.h" #include "resources/fboinfo.h" diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp index 6d4795e94..ad37f70f7 100644 --- a/src/render/nullopenglgraphics.cpp +++ b/src/render/nullopenglgraphics.cpp @@ -24,8 +24,6 @@ #include "render/nullopenglgraphics.h" -#include "graphicsmanager.h" - #ifdef DEBUG_BIND_TEXTURE #include "logger.h" #endif diff --git a/src/render/nullopenglgraphics.h b/src/render/nullopenglgraphics.h index 9d5229674..20b0e1a16 100644 --- a/src/render/nullopenglgraphics.h +++ b/src/render/nullopenglgraphics.h @@ -26,6 +26,7 @@ #if defined USE_OPENGL #include "localconsts.h" + #include "render/graphics.h" #include "resources/fboinfo.h" diff --git a/src/render/opengl/mgl.cpp b/src/render/opengl/mgl.cpp index d65ac3ec6..cdcd5808b 100644 --- a/src/render/opengl/mgl.cpp +++ b/src/render/opengl/mgl.cpp @@ -18,10 +18,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "render/opengl/mgl.h" - #ifdef USE_OPENGL +#include "render/opengl/mgl.h" + #include "debug.h" #define defName(name) name##_t m##name = nullptr @@ -29,4 +29,6 @@ // include function defines #include "render/opengl/mgl.hpp" +MGL_DEFINE + #endif diff --git a/src/render/opengl/mgl.h b/src/render/opengl/mgl.h index 07c5b7cf7..9c67687c8 100644 --- a/src/render/opengl/mgl.h +++ b/src/render/opengl/mgl.h @@ -21,8 +21,6 @@ #ifndef RENDER_OPENGL_MGL_H #define RENDER_OPENGL_MGL_H -#include "main.h" - #ifdef USE_OPENGL #include "render/opengl/mgltypes.h" @@ -32,7 +30,10 @@ #include "render/opengl/mgl.hpp" +MGL_DEFINE + #undef defName +#undef MGL_DEFINE #endif // USE_OPENGL #endif // RENDER_OPENGL_MGL_H diff --git a/src/render/opengl/mgl.hpp b/src/render/opengl/mgl.hpp index 7bc2fa5e8..b6b6a8508 100644 --- a/src/render/opengl/mgl.hpp +++ b/src/render/opengl/mgl.hpp @@ -18,6 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#define MGL_DEFINE + defName(glGenRenderbuffers); defName(glBindRenderbuffer); defName(glRenderbufferStorage); diff --git a/src/render/opengl/mglcheck.h b/src/render/opengl/mglcheck.h index b98eed846..478ea25ba 100644 --- a/src/render/opengl/mglcheck.h +++ b/src/render/opengl/mglcheck.h @@ -21,7 +21,6 @@ #ifndef RENDER_OPENGL_MGLCHECK_H #define RENDER_OPENGL_MGLCHECK_H -#include "main.h" #ifdef USE_OPENGL #define isGLNull(func) (!(func)) diff --git a/src/render/opengl/mglfunctions.h b/src/render/opengl/mglfunctions.h index db0f3bc95..de445c06b 100644 --- a/src/render/opengl/mglfunctions.h +++ b/src/render/opengl/mglfunctions.h @@ -25,6 +25,8 @@ #include "logger.h" +LOGGER_H + #ifdef WIN32 #define getFunction(name) wglGetProcAddress(name) #elif defined ANDROID diff --git a/src/render/opengl/mgltypes.h b/src/render/opengl/mgltypes.h index 2d02979d4..2e85a5719 100644 --- a/src/render/opengl/mgltypes.h +++ b/src/render/opengl/mgltypes.h @@ -21,11 +21,8 @@ #ifndef RENDER_OPENGL_MGLTYPES_H #define RENDER_OPENGL_MGLTYPES_H -#include "main.h" - #ifdef USE_OPENGL - #ifdef ANDROID #include <GLES/gl.h> #include <GLES/glext.h> @@ -42,11 +39,15 @@ #include <OpenGL/glext.h> #else // defined(__APPLE__) #include <GL/glext.h> +#ifndef __glext_h_ +#error missing include <GL/glext.h> +#endif // __glext_h_ #endif // defined(__APPLE__) #endif #endif #include "render/opengl/mgldefines.h" +RENDER_OPENGL_MGLDEFINES_H #if defined(__GXX_EXPERIMENTAL_CXX0X__) #include <cstdint> diff --git a/src/render/opengl/opengldebug.h b/src/render/opengl/opengldebug.h index 6ff7da0a8..8d2f19e18 100644 --- a/src/render/opengl/opengldebug.h +++ b/src/render/opengl/opengldebug.h @@ -23,6 +23,8 @@ #include "render/opengl/mgl.h" +RENDER_OPENGL_MGL_H + #if defined(DEBUG_OPENGL) && defined(USE_OPENGL) #define GLDEBUG_START(text) if (mglPushGroupMarker) \ mglPushGroupMarker(sizeof(text), text); 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); diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp index 079ea9d31..50364590d 100644 --- a/src/render/safeopenglgraphics.cpp +++ b/src/render/safeopenglgraphics.cpp @@ -23,7 +23,9 @@ #if defined USE_OPENGL && !defined ANDROID #include "render/safeopenglgraphics.h" +#ifdef DEBUG_OPENGL #include "render/opengl/mgl.h" +#endif // DEBUG_OPENGL #include "resources/imagerect.h" #include "resources/safeopenglimagehelper.h" diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp index b8c770bf4..9cd734f30 100644 --- a/src/render/sdlgraphics.cpp +++ b/src/render/sdlgraphics.cpp @@ -24,8 +24,6 @@ #include "render/sdlgraphics.h" -#include "main.h" - #include "graphicsmanager.h" #include "utils/sdlcheckutils.h" diff --git a/src/render/vertexes/imagecollection.h b/src/render/vertexes/imagecollection.h index 071499dbf..922fb6bd5 100644 --- a/src/render/vertexes/imagecollection.h +++ b/src/render/vertexes/imagecollection.h @@ -21,8 +21,6 @@ #ifndef RENDER_VERTEXES_IMAGECOLLECTION_H #define RENDER_VERTEXES_IMAGECOLLECTION_H -#include "main.h" - #include "render/vertexes/imagevertexes.h" #include "localconsts.h" diff --git a/src/render/vertexes/openglgraphicsvertexes.h b/src/render/vertexes/openglgraphicsvertexes.h index c5d7e3014..6df146e2c 100644 --- a/src/render/vertexes/openglgraphicsvertexes.h +++ b/src/render/vertexes/openglgraphicsvertexes.h @@ -23,8 +23,6 @@ #ifdef USE_OPENGL -#include "main.h" - #ifdef ANDROID #include <GLES/gl.h> #else |