From d9a9abf97104bb25e73057e6981ea2b2f7f71e93 Mon Sep 17 00:00:00 2001 From: "spartanj@gmail.com" Date: Wed, 5 Dec 2012 02:08:32 -0300 Subject: [PATCH] Cleaning up some includes. --- include/eepp/gaming/base.hpp | 1 + include/eepp/gaming/cisomap.hpp | 1 - include/eepp/graphics/base.hpp | 236 ----------------- include/eepp/graphics/cbatchrenderer.hpp | 1 - include/eepp/graphics/cframebuffer.hpp | 3 +- include/eepp/graphics/cshader.hpp | 4 +- include/eepp/graphics/ctextcache.hpp | 1 - include/eepp/graphics/ctexture.hpp | 8 +- include/eepp/graphics/ctexturefactory.hpp | 8 +- include/eepp/graphics/cvertexbuffervbo.hpp | 2 +- include/eepp/graphics/glhelper.hpp | 33 ++- include/eepp/graphics/opengl.hpp | 242 ++++++++++++++++++ include/eepp/graphics/renderer/cgl.hpp | 34 +-- include/eepp/physics/physicshelper.hpp | 20 +- include/eepp/ui/base.hpp | 1 - include/eepp/window/base.hpp | 2 +- include/eepp/window/cengine.hpp | 1 + include/eepp/window/cinput.hpp | 1 + projects/linux/ee.creator.user | 2 +- projects/linux/ee.files | 2 +- src/eepp/gaming/cisomap.cpp | 1 + src/eepp/gaming/cmap.cpp | 4 +- src/eepp/graphics/cbatchrenderer.cpp | 1 + src/eepp/graphics/cconsole.cpp | 2 +- src/eepp/graphics/cfont.cpp | 1 + src/eepp/graphics/cframebuffer.cpp | 2 + src/eepp/graphics/cframebufferfbo.cpp | 2 +- src/eepp/graphics/cparticlesystem.cpp | 2 +- src/eepp/graphics/cshader.cpp | 2 +- src/eepp/graphics/cshaderprogram.cpp | 2 +- src/eepp/graphics/ctextcache.cpp | 1 + src/eepp/graphics/ctexture.cpp | 1 + src/eepp/graphics/ctexturefactory.cpp | 6 +- src/eepp/graphics/ctextureloader.cpp | 2 +- src/eepp/graphics/cvertexbuffer.cpp | 2 +- src/eepp/graphics/cvertexbufferogl.cpp | 2 +- src/eepp/graphics/cvertexbuffervbo.cpp | 2 +- src/eepp/graphics/glhelper.cpp | 2 +- .../physics/constraints/cdampedspring.cpp | 2 +- src/eepp/physics/cshapesegment.cpp | 2 +- src/eepp/ui/cuicontrolanim.cpp | 1 + src/eepp/ui/cuitextinput.cpp | 1 + src/eepp/window/backend/SDL/cwindowsdl.cpp | 6 +- src/eepp/window/backend/SDL2/cwindowsdl2.cpp | 1 + src/eepp/window/backend/SFML/cwindowsfml.cpp | 9 +- .../window/backend/allegro5/cwindowal.cpp | 11 +- src/eepp/window/cengine.cpp | 2 +- src/eepp/window/cwindow.cpp | 6 +- 48 files changed, 354 insertions(+), 327 deletions(-) create mode 100644 include/eepp/graphics/opengl.hpp diff --git a/include/eepp/gaming/base.hpp b/include/eepp/gaming/base.hpp index 82956b2ae..cd8d32310 100644 --- a/include/eepp/gaming/base.hpp +++ b/include/eepp/gaming/base.hpp @@ -10,6 +10,7 @@ using namespace EE::Math; #include #include +#include #include #include #include diff --git a/include/eepp/gaming/cisomap.hpp b/include/eepp/gaming/cisomap.hpp index f9cf6c761..4eef9c33b 100755 --- a/include/eepp/gaming/cisomap.hpp +++ b/include/eepp/gaming/cisomap.hpp @@ -13,7 +13,6 @@ using namespace EE::Window; #include #include #include -#include using namespace EE::Graphics; #include diff --git a/include/eepp/graphics/base.hpp b/include/eepp/graphics/base.hpp index 46cf5c5bf..2d18ce37f 100644 --- a/include/eepp/graphics/base.hpp +++ b/include/eepp/graphics/base.hpp @@ -3,242 +3,6 @@ #include -#ifdef EE_64BIT -#define GL_FP GL_DOUBLE -#else -#define GL_FP GL_FLOAT -#endif - -#if ( EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) ) && !defined( EE_GLES ) - #define EE_GLEW_AVAILABLE -#endif - -#ifndef EE_GLES - //! GL2 and GL3 ( PC platform ) - - #ifdef EE_GLEW_AVAILABLE - #include - #else - #ifndef GL_GLEXT_PROTOTYPES - #define GL_GLEXT_PROTOTYPES - #endif - #endif - - #if EE_PLATFORM == EE_PLATFORM_MACOSX - #include - #else - #include - #endif - - #ifndef EE_GLEW_AVAILABLE - #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN - #include - #elif EE_PLATFORM == EE_PLATFORM_MACOSX - #include - #endif - #endif - -#else - //! Mobile platform ( Android / iPhone / Maemo ) - - #ifdef EE_GLES_BOTH - #if EE_PLATFORM == EE_PLATFORM_IOS - #include - #include - #else - #include - #include - #endif - - #define EE_GLES1_LATE_INCLUDE - #else - //! GLES2 ( programmable pipeline ) - #ifdef EE_GLES2 - #if EE_PLATFORM == EE_PLATFORM_IOS - #include - #include - #else - #include - #include - #endif - #endif - - //! GLES1 ( fixed pipeline ) - #ifdef EE_GLES1 - #if EE_PLATFORM == EE_PLATFORM_IOS - #include - #include - #else - #include - - #ifndef GL_GLEXT_PROTOTYPES - #define GL_GLEXT_PROTOTYPES - #endif - - #include - #endif - #endif - #endif -#endif - -#ifdef EE_GLES - typedef GLfloat GLdouble; - typedef char GLchar; - - #define glDeleteBuffersARB glDeleteBuffers - #define glGenBuffersARB glGenBuffers - #define glBindBufferARB glBindBuffer - #define glBufferDataARB glBufferData - #define glBufferSubDataARB glBufferSubData -#endif - -/// Wrap GLES2 functions -#if defined( EE_GLES2 ) - -#define glCheckFramebufferStatusEXT glCheckFramebufferStatus -#define glDeleteFramebuffersEXT glDeleteFramebuffers -#define glGenFramebuffersEXT glGenFramebuffers -#define glGenRenderbuffersEXT glGenRenderbuffers -#define glBindFramebufferEXT glBindFramebuffer -#define glRenderbufferStorageEXT glRenderbufferStorage -#define glBindRenderbufferEXT glBindRenderbuffer -#define glFramebufferRenderbufferEXT glFramebufferRenderbuffer -#define glFramebufferTexture2DEXT glFramebufferTexture2D -#define glVertexAttribPointerARB glVertexAttribPointer - -#endif - -/// Exclusive only when its compiling only for GLES2 -#if ( defined( EE_GLES2 ) && !defined( EE_GLES1 ) ) || defined( EE_GLES_BOTH ) - -#define GL_MODELVIEW 0x1700 -#define GL_PROJECTION 0x1701 -#define GL_TEXTURE 0x1702 -#define GL_MODELVIEW_MATRIX 0x0BA6 -#define GL_PROJECTION_MATRIX 0x0BA7 -#define GL_TEXTURE_MATRIX 0x0BA8 -#define GL_VERTEX_ARRAY 0x8074 -#define GL_NORMAL_ARRAY 0x8075 -#define GL_COLOR_ARRAY 0x8076 -#define GL_INDEX_ARRAY 0x8077 -#define GL_TEXTURE_COORD_ARRAY 0x8078 -#define GL_EDGE_FLAG_ARRAY 0x8079 -#define GL_LINE 0x1B01 -#define GL_FILL 0x1B02 -#define GL_LINE_SMOOTH 0x0B20 -#define GL_LIGHTING 0x0B50 -#define GL_CLIP_PLANE0 0x3000 -#define GL_CLIP_PLANE1 0x3001 -#define GL_CLIP_PLANE2 0x3002 -#define GL_CLIP_PLANE3 0x3003 -#define GL_CLIP_PLANE4 0x3004 -#define GL_CLIP_PLANE5 0x3005 -#define GL_POINT_SPRITE 0x8861 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 - -#define glBlendFuncSeparateEXT glBlendFuncSeparate - -#endif - -#if defined( EE_GLES1 ) && !defined( EE_GLES2 ) || defined( EE_GLES_BOTH ) - -#define glOrtho glOrthof -#define glClipPlane glClipPlanef -#define glFrustum glFrustumf - -#define GL_COORD_REPLACE GL_COORD_REPLACE_OES -#define GL_COMBINE_ARB GL_COMBINE - -#endif - -/// Exclusive when its compiling only for GLES1 -#if defined( EE_GLES1 ) && !defined( EE_GLES2 ) - -#define GL_POINT_SPRITE GL_POINT_SPRITE_OES - -#define glCheckFramebufferStatusEXT glCheckFramebufferStatusOES -#define glDeleteFramebuffersEXT glDeleteFramebuffersOES -#define glGenFramebuffersEXT glGenFramebuffersOES -#define glGenRenderbuffersEXT glGenRenderbuffersOES -#define glBindFramebufferEXT glBindFramebufferOES -#define glRenderbufferStorageEXT glRenderbufferStorageOES -#define glBindRenderbufferEXT glBindRenderbufferOES -#define glFramebufferRenderbufferEXT glFramebufferRenderbufferOES -#define glFramebufferTexture2DEXT glFramebufferTexture2DOES -#define glBlendFuncSeparateEXT glBlendFuncSeparateOES - -#define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACEGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES -#define GL_FRAMEBUFFER_COMPLETE GL_FRAMEBUFFER_COMPLETE_OES -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES -#define GL_FRAMEBUFFER_UNSUPPORTED GL_FRAMEBUFFER_UNSUPPORTED_OES -#define GL_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING_OES - -#define GL_RENDERBUFFER GL_RENDERBUFFER_OES -#define GL_RENDERBUFFER_WIDTH GL_RENDERBUFFER_WIDTH_OES -#define GL_RENDERBUFFER_HEIGHT GL_RENDERBUFFER_HEIGHT_OES -#define GL_RENDERBUFFER_INTERNAL_FORMAT GL_RENDERBUFFER_INTERNAL_FORMAT_OES -#define GL_RENDERBUFFER_RED_SIZE GL_RENDERBUFFER_RED_SIZE_OES -#define GL_RENDERBUFFER_GREEN_SIZE GL_RENDERBUFFER_GREEN_SIZE_OES -#define GL_RENDERBUFFER_BLUE_SIZE GL_RENDERBUFFER_BLUE_SIZE_OES -#define GL_RENDERBUFFER_ALPHA_SIZE GL_RENDERBUFFER_ALPHA_SIZE_OES -#define GL_RENDERBUFFER_DEPTH_SIZE GL_RENDERBUFFER_DEPTH_SIZE_OES -#define GL_RENDERBUFFER_STENCIL_SIZE GL_RENDERBUFFER_STENCIL_SIZE_OES -#define GL_RENDERBUFFER_BINDING GL_RENDERBUFFER_BINDING_OES - -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 - -#ifndef GL_UNSIGNED_INT -#define GL_UNSIGNED_INT GL_UNSIGNED_INT_24_8_OES -#endif - -#define GL_LINE 0x1B01 -#define GL_FILL 0x1B02 - -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA - -#ifdef GL_DEPTH_COMPONENT32_OES -#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT32_OES -#else -#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT16_OES -#endif - -#define GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_OES -#define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_OES - -#define GL_SUBTRACT_ARB GL_SUBTRACT -#define GL_ADD_SIGNED_ARB GL_ADD_SIGNED -#define GL_INTERPOLATE_ARB GL_INTERPOLATE -#define GL_DOT3_RGB_ARB GL_DOT3_RGB -#define GL_DOT3_RGBA_ARB GL_DOT3_RGBA - -#define GL_CONSTANT_ARB GL_CONSTANT -#define GL_PRIMARY_COLOR_ARB GL_PRIMARY_COLOR -#define GL_PREVIOUS_ARB GL_PREVIOUS - -#endif - -#ifdef EE_GLES - #define EE_QUAD_VERTEX 6 -#else - #define EE_QUAD_VERTEX 4 -#endif - #include #include #include diff --git a/include/eepp/graphics/cbatchrenderer.hpp b/include/eepp/graphics/cbatchrenderer.hpp index 1c8b478a0..b0cd35a84 100755 --- a/include/eepp/graphics/cbatchrenderer.hpp +++ b/include/eepp/graphics/cbatchrenderer.hpp @@ -2,7 +2,6 @@ #define EE_GRAPHICSCBATCHRENDERER_H #include -#include namespace EE { namespace Graphics { diff --git a/include/eepp/graphics/cframebuffer.hpp b/include/eepp/graphics/cframebuffer.hpp index cd2b282ed..fd8f5253d 100644 --- a/include/eepp/graphics/cframebuffer.hpp +++ b/include/eepp/graphics/cframebuffer.hpp @@ -4,7 +4,8 @@ #include #include #include -#include + +namespace EE { namespace Window { class cWindow; } } using namespace EE::Window; diff --git a/include/eepp/graphics/cshader.hpp b/include/eepp/graphics/cshader.hpp index 0af283bf3..cba0317bc 100644 --- a/include/eepp/graphics/cshader.hpp +++ b/include/eepp/graphics/cshader.hpp @@ -62,8 +62,8 @@ class EE_API cShader { void Reload(); protected: friend class cRendererGL3; - GLuint mGLId; - GLenum mType; + Uint32 mGLId; + Uint32 mType; std::string mFilename; std::string mCompileLog; std::string mSource; diff --git a/include/eepp/graphics/ctextcache.hpp b/include/eepp/graphics/ctextcache.hpp index a39def911..07bd3919d 100644 --- a/include/eepp/graphics/ctextcache.hpp +++ b/include/eepp/graphics/ctextcache.hpp @@ -3,7 +3,6 @@ #include #include -#include namespace EE { namespace Graphics { diff --git a/include/eepp/graphics/ctexture.hpp b/include/eepp/graphics/ctexture.hpp index b4e474d34..b14b34f19 100755 --- a/include/eepp/graphics/ctexture.hpp +++ b/include/eepp/graphics/ctexture.hpp @@ -16,10 +16,10 @@ namespace EE { namespace Graphics { class EE_API cTexture : public cImage { public: /** Set the OpenGL Texture Id (texture handle) */ - void Handle( const Uint32& texture ) { mTexture = texture; } + void Handle( const int& texture ) { mTexture = texture; } /** @return The OpenGL Texture Id (texture handle) */ - Uint32 Handle() const { return mTexture; } + int Handle() const { return mTexture; } /** @return The hash of the filename */ const Uint32& HashName() const; @@ -233,7 +233,7 @@ class EE_API cTexture : public cImage { Uint32 mId; Uint32 mTexId; - GLint mTexture; + int mTexture; eeUint mImgWidth; eeUint mImgHeight; @@ -243,7 +243,7 @@ class EE_API cTexture : public cImage { EE_CLAMP_MODE mClampMode; EE_TEX_FILTER mFilter; - GLint mInternalFormat; + int mInternalFormat; void ApplyClampMode(); diff --git a/include/eepp/graphics/ctexturefactory.hpp b/include/eepp/graphics/ctexturefactory.hpp index 1a86baa48..1ec56ebd1 100755 --- a/include/eepp/graphics/ctexturefactory.hpp +++ b/include/eepp/graphics/ctexturefactory.hpp @@ -113,13 +113,13 @@ class EE_API cTextureFactory : protected cMutex { * @return The real current texture id (OpenGL Texture Id) * @param TextureUnit The Texture Unit binded */ - GLint GetCurrentTexture( const Uint32& TextureUnit = 0 ) const; + int GetCurrentTexture( const Uint32& TextureUnit = 0 ) const; /** Set the current internal texture id. This will set the TexId as the current texture binded. - * @param TexId The internal Texture Id + * @param TexId The real current texture id (OpenGL Texture Id) * @param TextureUnit The Texture Unit binded */ - void SetCurrentTexture( const GLint& TexId, const Uint32& TextureUnit ); + void SetCurrentTexture( const int& TexId, const Uint32& TextureUnit ); /** Returns the number of textures loaded */ Uint32 GetNumTextures() const { return (Uint32)mTextures.size(); } @@ -200,7 +200,7 @@ class EE_API cTextureFactory : protected cMutex { cTextureFactory(); - GLint mCurrentTexture[ EE_MAX_TEXTURE_UNITS ]; + int mCurrentTexture[ EE_MAX_TEXTURE_UNITS ]; EE_BLEND_MODE mLastBlend; diff --git a/include/eepp/graphics/cvertexbuffervbo.hpp b/include/eepp/graphics/cvertexbuffervbo.hpp index 9adf133d7..0e4ad649b 100644 --- a/include/eepp/graphics/cvertexbuffervbo.hpp +++ b/include/eepp/graphics/cvertexbuffervbo.hpp @@ -31,7 +31,7 @@ class EE_API cVertexBufferVBO : public cVertexBuffer { bool mTextured; - GLuint mVAO; + Uint32 mVAO; Uint32 mElementHandle; diff --git a/include/eepp/graphics/glhelper.hpp b/include/eepp/graphics/glhelper.hpp index 61742b8d2..708cac4da 100644 --- a/include/eepp/graphics/glhelper.hpp +++ b/include/eepp/graphics/glhelper.hpp @@ -1,6 +1,37 @@ #ifndef EE_GRAPHICSGLHELPER_HPP #define EE_GRAPHICSGLHELPER_HPP -#include +/** Just for reference */ +enum EEGL_ARRAY_STATES { + EEGL_VERTEX_ARRAY = 0, + EEGL_NORMAL_ARRAY, + EEGL_COLOR_ARRAY, + EEGL_ARRAY_STATES_COUNT, + EEGL_TEXTURE_COORD_ARRAY +}; + +enum EEGL_extensions { + EEGL_ARB_texture_non_power_of_two = 0, + EEGL_ARB_point_parameters, + EEGL_ARB_point_sprite, + EEGL_ARB_shading_language_100, + EEGL_ARB_shader_objects, + EEGL_ARB_vertex_shader, + EEGL_ARB_fragment_shader, + EEGL_EXT_framebuffer_object, + EEGL_ARB_multitexture, + EEGL_EXT_texture_compression_s3tc, + EEGL_ARB_vertex_buffer_object, + EEGL_ARB_vertex_array_object, + EEGL_EXT_blend_func_separate +}; + +enum EEGL_version { + GLv_2, + GLv_3, + GLv_ES1, + GLv_ES2, + GLv_default +}; #endif diff --git a/include/eepp/graphics/opengl.hpp b/include/eepp/graphics/opengl.hpp new file mode 100644 index 000000000..6358ca0e2 --- /dev/null +++ b/include/eepp/graphics/opengl.hpp @@ -0,0 +1,242 @@ +#ifndef EE_OPENGL_HPP +#define EE_OPENGL_HPP + +#ifdef EE_64BIT +#define GL_FP GL_DOUBLE +#else +#define GL_FP GL_FLOAT +#endif + +#if ( EE_PLATFORM == EE_PLATFORM_WIN || EE_PLATFORM == EE_PLATFORM_MACOSX || defined( EE_X11_PLATFORM ) ) && !defined( EE_GLES ) + #define EE_GLEW_AVAILABLE +#endif + +#ifndef EE_GLES + //! GL2 and GL3 ( PC platform ) + + #ifdef EE_GLEW_AVAILABLE + #include + #else + #ifndef GL_GLEXT_PROTOTYPES + #define GL_GLEXT_PROTOTYPES + #endif + #endif + + #if EE_PLATFORM == EE_PLATFORM_MACOSX + #include + #else + #include + #endif + + #ifndef EE_GLEW_AVAILABLE + #if defined( EE_X11_PLATFORM ) || EE_PLATFORM == EE_PLATFORM_WIN + #include + #elif EE_PLATFORM == EE_PLATFORM_MACOSX + #include + #endif + #endif + +#else + //! Mobile platform ( Android / iPhone / Maemo ) + + #ifdef EE_GLES_BOTH + #if EE_PLATFORM == EE_PLATFORM_IOS + #include + #include + #else + #include + #include + #endif + + #define EE_GLES1_LATE_INCLUDE + #else + //! GLES2 ( programmable pipeline ) + #ifdef EE_GLES2 + #if EE_PLATFORM == EE_PLATFORM_IOS + #include + #include + #else + #include + #include + #endif + #endif + + //! GLES1 ( fixed pipeline ) + #ifdef EE_GLES1 + #if EE_PLATFORM == EE_PLATFORM_IOS + #include + #include + #else + #include + + #ifndef GL_GLEXT_PROTOTYPES + #define GL_GLEXT_PROTOTYPES + #endif + + #include + #endif + #endif + #endif +#endif + +#ifdef EE_GLES + typedef GLfloat GLdouble; + typedef char GLchar; + + #define glDeleteBuffersARB glDeleteBuffers + #define glGenBuffersARB glGenBuffers + #define glBindBufferARB glBindBuffer + #define glBufferDataARB glBufferData + #define glBufferSubDataARB glBufferSubData +#endif + +/// Wrap GLES2 functions +#if defined( EE_GLES2 ) + +#define glCheckFramebufferStatusEXT glCheckFramebufferStatus +#define glDeleteFramebuffersEXT glDeleteFramebuffers +#define glGenFramebuffersEXT glGenFramebuffers +#define glGenRenderbuffersEXT glGenRenderbuffers +#define glBindFramebufferEXT glBindFramebuffer +#define glRenderbufferStorageEXT glRenderbufferStorage +#define glBindRenderbufferEXT glBindRenderbuffer +#define glFramebufferRenderbufferEXT glFramebufferRenderbuffer +#define glFramebufferTexture2DEXT glFramebufferTexture2D +#define glVertexAttribPointerARB glVertexAttribPointer + +#endif + +/// Exclusive only when its compiling only for GLES2 +#if ( defined( EE_GLES2 ) && !defined( EE_GLES1 ) ) || defined( EE_GLES_BOTH ) + +#define GL_MODELVIEW 0x1700 +#define GL_PROJECTION 0x1701 +#define GL_TEXTURE 0x1702 +#define GL_MODELVIEW_MATRIX 0x0BA6 +#define GL_PROJECTION_MATRIX 0x0BA7 +#define GL_TEXTURE_MATRIX 0x0BA8 +#define GL_VERTEX_ARRAY 0x8074 +#define GL_NORMAL_ARRAY 0x8075 +#define GL_COLOR_ARRAY 0x8076 +#define GL_INDEX_ARRAY 0x8077 +#define GL_TEXTURE_COORD_ARRAY 0x8078 +#define GL_EDGE_FLAG_ARRAY 0x8079 +#define GL_LINE 0x1B01 +#define GL_FILL 0x1B02 +#define GL_LINE_SMOOTH 0x0B20 +#define GL_LIGHTING 0x0B50 +#define GL_CLIP_PLANE0 0x3000 +#define GL_CLIP_PLANE1 0x3001 +#define GL_CLIP_PLANE2 0x3002 +#define GL_CLIP_PLANE3 0x3003 +#define GL_CLIP_PLANE4 0x3004 +#define GL_CLIP_PLANE5 0x3005 +#define GL_POINT_SPRITE 0x8861 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 + +#define glBlendFuncSeparateEXT glBlendFuncSeparate + +#endif + +#if defined( EE_GLES1 ) && !defined( EE_GLES2 ) || defined( EE_GLES_BOTH ) + +#define glOrtho glOrthof +#define glClipPlane glClipPlanef +#define glFrustum glFrustumf + +#define GL_COORD_REPLACE GL_COORD_REPLACE_OES +#define GL_COMBINE_ARB GL_COMBINE + +#endif + +/// Exclusive when its compiling only for GLES1 +#if defined( EE_GLES1 ) && !defined( EE_GLES2 ) + +#define GL_POINT_SPRITE GL_POINT_SPRITE_OES + +#define glCheckFramebufferStatusEXT glCheckFramebufferStatusOES +#define glDeleteFramebuffersEXT glDeleteFramebuffersOES +#define glGenFramebuffersEXT glGenFramebuffersOES +#define glGenRenderbuffersEXT glGenRenderbuffersOES +#define glBindFramebufferEXT glBindFramebufferOES +#define glRenderbufferStorageEXT glRenderbufferStorageOES +#define glBindRenderbufferEXT glBindRenderbufferOES +#define glFramebufferRenderbufferEXT glFramebufferRenderbufferOES +#define glFramebufferTexture2DEXT glFramebufferTexture2DOES +#define glBlendFuncSeparateEXT glBlendFuncSeparateOES + +#define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACEGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES +#define GL_FRAMEBUFFER_COMPLETE GL_FRAMEBUFFER_COMPLETE_OES +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES +#define GL_FRAMEBUFFER_UNSUPPORTED GL_FRAMEBUFFER_UNSUPPORTED_OES +#define GL_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING_OES + +#define GL_RENDERBUFFER GL_RENDERBUFFER_OES +#define GL_RENDERBUFFER_WIDTH GL_RENDERBUFFER_WIDTH_OES +#define GL_RENDERBUFFER_HEIGHT GL_RENDERBUFFER_HEIGHT_OES +#define GL_RENDERBUFFER_INTERNAL_FORMAT GL_RENDERBUFFER_INTERNAL_FORMAT_OES +#define GL_RENDERBUFFER_RED_SIZE GL_RENDERBUFFER_RED_SIZE_OES +#define GL_RENDERBUFFER_GREEN_SIZE GL_RENDERBUFFER_GREEN_SIZE_OES +#define GL_RENDERBUFFER_BLUE_SIZE GL_RENDERBUFFER_BLUE_SIZE_OES +#define GL_RENDERBUFFER_ALPHA_SIZE GL_RENDERBUFFER_ALPHA_SIZE_OES +#define GL_RENDERBUFFER_DEPTH_SIZE GL_RENDERBUFFER_DEPTH_SIZE_OES +#define GL_RENDERBUFFER_STENCIL_SIZE GL_RENDERBUFFER_STENCIL_SIZE_OES +#define GL_RENDERBUFFER_BINDING GL_RENDERBUFFER_BINDING_OES + +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 + +#ifndef GL_UNSIGNED_INT +#define GL_UNSIGNED_INT GL_UNSIGNED_INT_24_8_OES +#endif + +#define GL_LINE 0x1B01 +#define GL_FILL 0x1B02 + +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA + +#ifdef GL_DEPTH_COMPONENT32_OES +#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT32_OES +#else +#define GL_DEPTH_COMPONENT GL_DEPTH_COMPONENT16_OES +#endif + +#define GL_DEPTH_ATTACHMENT GL_DEPTH_ATTACHMENT_OES +#define GL_COLOR_ATTACHMENT0 GL_COLOR_ATTACHMENT0_OES + +#define GL_SUBTRACT_ARB GL_SUBTRACT +#define GL_ADD_SIGNED_ARB GL_ADD_SIGNED +#define GL_INTERPOLATE_ARB GL_INTERPOLATE +#define GL_DOT3_RGB_ARB GL_DOT3_RGB +#define GL_DOT3_RGBA_ARB GL_DOT3_RGBA + +#define GL_CONSTANT_ARB GL_CONSTANT +#define GL_PRIMARY_COLOR_ARB GL_PRIMARY_COLOR +#define GL_PREVIOUS_ARB GL_PREVIOUS + +#endif + +#ifdef EE_GLES + #define EE_QUAD_VERTEX 6 +#else + #define EE_QUAD_VERTEX 4 +#endif + +#include + +#endif diff --git a/include/eepp/graphics/renderer/cgl.hpp b/include/eepp/graphics/renderer/cgl.hpp index 895523438..4f7c5dab7 100644 --- a/include/eepp/graphics/renderer/cgl.hpp +++ b/include/eepp/graphics/renderer/cgl.hpp @@ -3,6 +3,7 @@ #include #include +#include namespace EE { namespace Graphics { @@ -10,39 +11,6 @@ namespace EE { namespace Graphics { #define EE_MAX_PLANES 6 #endif -/** Just for reference */ -enum EEGL_ARRAY_STATES { - EEGL_VERTEX_ARRAY = 0, - EEGL_NORMAL_ARRAY, - EEGL_COLOR_ARRAY, - EEGL_ARRAY_STATES_COUNT, - EEGL_TEXTURE_COORD_ARRAY -}; - -enum EEGL_extensions { - EEGL_ARB_texture_non_power_of_two = 0, - EEGL_ARB_point_parameters, - EEGL_ARB_point_sprite, - EEGL_ARB_shading_language_100, - EEGL_ARB_shader_objects, - EEGL_ARB_vertex_shader, - EEGL_ARB_fragment_shader, - EEGL_EXT_framebuffer_object, - EEGL_ARB_multitexture, - EEGL_EXT_texture_compression_s3tc, - EEGL_ARB_vertex_buffer_object, - EEGL_ARB_vertex_array_object, - EEGL_EXT_blend_func_separate -}; - -enum EEGL_version { - GLv_2, - GLv_3, - GLv_ES1, - GLv_ES2, - GLv_default -}; - class cRendererGL; class cRendererGL3; class cRendererGLES2; diff --git a/include/eepp/physics/physicshelper.hpp b/include/eepp/physics/physicshelper.hpp index 4cb5fdeb3..fb9d5c924 100644 --- a/include/eepp/physics/physicshelper.hpp +++ b/include/eepp/physics/physicshelper.hpp @@ -78,7 +78,7 @@ typedef cpBB cBB; #ifdef PHYSICS_RENDERER_ENABLED -static const GLfloat pillVAR[] = { +static const float pillVAR[] = { 0.0000f, 1.0000f, 1.0f, 0.2588f, 0.9659f, 1.0f, 0.5000f, 0.8660f, 1.0f, @@ -107,7 +107,7 @@ static const GLfloat pillVAR[] = { -0.2588f, 0.9659f, 0.0f, 0.0000f, 1.0000f, 0.0f, }; -static const int pillVAR_count = sizeof(pillVAR)/sizeof(GLfloat)/3; +static const int pillVAR_count = sizeof(pillVAR)/sizeof(float)/3; inline eeColorA ColorFromPointer(void *ptr) { unsigned long val = (long)ptr; @@ -120,11 +120,11 @@ inline eeColorA ColorFromPointer(void *ptr) { val = (val+0xfd7046c5) + (val<<3); val = (val^0xb55a4f09) ^ (val>>16); - GLubyte r = (val>>0) & 0xFF; - GLubyte g = (val>>8) & 0xFF; - GLubyte b = (val>>16) & 0xFF; + unsigned char r = (val>>0) & 0xFF; + unsigned char g = (val>>8) & 0xFF; + unsigned char b = (val>>16) & 0xFF; - GLubyte max = r>g ? (r>b ? r : b) : (g>b ? g : b); + unsigned char max = r>g ? (r>b ? r : b) : (g>b ? g : b); const int mult = 127; const int add = 63; @@ -141,11 +141,11 @@ inline eeColorA ColorForShape( cpShape *shape, cpSpace *space ) { if(body){ if(cpBodyIsSleeping(body)){ - GLfloat v = 0.25f; + float v = 0.25f; nc = (int)( v * 255 ); return eeColorA( nc, nc, nc, 255 ); } else if(body->CP_PRIVATE(node).idleTime > space->sleepTimeThreshold) { - GLfloat v = 0.9f; + float v = 0.9f; nc = (int)( v * 255 ); return eeColorA( nc, nc, nc, 255 ); } @@ -154,7 +154,7 @@ inline eeColorA ColorForShape( cpShape *shape, cpSpace *space ) { return ColorFromPointer( shape ); } -static const GLfloat springVAR[] = { +static const float springVAR[] = { 0.00f, 0.0f, 0.20f, 0.0f, 0.25f, 3.0f, @@ -171,7 +171,7 @@ static const GLfloat springVAR[] = { 0.80f, 0.0f, 1.00f, 0.0f, }; -static const int springVAR_count = sizeof(springVAR)/sizeof(GLfloat)/2; +static const int springVAR_count = sizeof(springVAR)/sizeof(float)/2; #endif diff --git a/include/eepp/ui/base.hpp b/include/eepp/ui/base.hpp index 9bfba05b5..7e0e28cb7 100644 --- a/include/eepp/ui/base.hpp +++ b/include/eepp/ui/base.hpp @@ -25,7 +25,6 @@ using namespace EE::Window; #include #include #include -#include using namespace EE::Graphics; #endif diff --git a/include/eepp/window/base.hpp b/include/eepp/window/base.hpp index 3f8ebfd74..75a9e8dd6 100644 --- a/include/eepp/window/base.hpp +++ b/include/eepp/window/base.hpp @@ -15,7 +15,7 @@ using namespace EE::Math; using namespace EE::System; #include -#include +#include using namespace EE::Graphics; #if EE_PLATFORM == EE_PLATFORM_WIN diff --git a/include/eepp/window/cengine.hpp b/include/eepp/window/cengine.hpp index 625478cef..27e8e6c88 100755 --- a/include/eepp/window/cengine.hpp +++ b/include/eepp/window/cengine.hpp @@ -3,6 +3,7 @@ #include #include +#include namespace EE { namespace System { class cIniFile; } } namespace EE { namespace Window { namespace Backend { class cBackend; } } } diff --git a/include/eepp/window/cinput.hpp b/include/eepp/window/cinput.hpp index 001e676b9..1ac0eb5aa 100644 --- a/include/eepp/window/cinput.hpp +++ b/include/eepp/window/cinput.hpp @@ -7,6 +7,7 @@ #include #include #include +#include namespace EE { namespace Window { diff --git a/projects/linux/ee.creator.user b/projects/linux/ee.creator.user index c341c4584..ab358b58d 100644 --- a/projects/linux/ee.creator.user +++ b/projects/linux/ee.creator.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/projects/linux/ee.files b/projects/linux/ee.files index bb7d12357..64de25010 100644 --- a/projects/linux/ee.files +++ b/projects/linux/ee.files @@ -128,7 +128,6 @@ ../../include/eepp/graphics/vbohelper.hpp ../../include/eepp/graphics/renders.hpp ../../include/eepp/graphics/pixelperfect.hpp -../../include/eepp/graphics/glhelper.hpp ../../include/eepp/graphics/fonthelper.hpp ../../include/eepp/graphics/cvertexbuffervbo.hpp ../../include/eepp/graphics/cvertexbufferogl.hpp @@ -569,3 +568,4 @@ ../../src/eepp/window/backend/SDL2/cbackendsdl.cpp ../../include/eepp/system/filesystem.hpp ../../src/eepp/system/filesystem.cpp +../../include/eepp/graphics/glhelper.hpp diff --git a/src/eepp/gaming/cisomap.cpp b/src/eepp/gaming/cisomap.cpp index 52ef499bc..590a124bd 100755 --- a/src/eepp/gaming/cisomap.cpp +++ b/src/eepp/gaming/cisomap.cpp @@ -1,4 +1,5 @@ #include +#include namespace EE { namespace Gaming { diff --git a/src/eepp/gaming/cmap.cpp b/src/eepp/gaming/cmap.cpp index 1ef2a3a3e..124e2c0e3 100644 --- a/src/eepp/gaming/cmap.cpp +++ b/src/eepp/gaming/cmap.cpp @@ -8,12 +8,14 @@ #include +#include #include #include #include -#include using namespace EE::Graphics; +#include + namespace EE { namespace Gaming { cMap::cMap() : diff --git a/src/eepp/graphics/cbatchrenderer.cpp b/src/eepp/graphics/cbatchrenderer.cpp index afb1885f2..33dd3a4bf 100755 --- a/src/eepp/graphics/cbatchrenderer.cpp +++ b/src/eepp/graphics/cbatchrenderer.cpp @@ -2,6 +2,7 @@ #include #include #include +#include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/cconsole.cpp b/src/eepp/graphics/cconsole.cpp index 660b9d335..135e61aae 100755 --- a/src/eepp/graphics/cconsole.cpp +++ b/src/eepp/graphics/cconsole.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/src/eepp/graphics/cfont.cpp b/src/eepp/graphics/cfont.cpp index 0385f149c..bf3d54b18 100644 --- a/src/eepp/graphics/cfont.cpp +++ b/src/eepp/graphics/cfont.cpp @@ -1,6 +1,7 @@ #include #include #include +#include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/cframebuffer.cpp b/src/eepp/graphics/cframebuffer.cpp index e7aa61104..4da5b6641 100644 --- a/src/eepp/graphics/cframebuffer.cpp +++ b/src/eepp/graphics/cframebuffer.cpp @@ -2,9 +2,11 @@ #include #include #include +#include #include #include #include +#include using namespace EE::Graphics::Private; namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/cframebufferfbo.cpp b/src/eepp/graphics/cframebufferfbo.cpp index 66491c282..3a4d7a8f8 100644 --- a/src/eepp/graphics/cframebufferfbo.cpp +++ b/src/eepp/graphics/cframebufferfbo.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/cparticlesystem.cpp b/src/eepp/graphics/cparticlesystem.cpp index 8732faeb2..86c135617 100755 --- a/src/eepp/graphics/cparticlesystem.cpp +++ b/src/eepp/graphics/cparticlesystem.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/src/eepp/graphics/cshader.cpp b/src/eepp/graphics/cshader.cpp index 6d286891e..2a11569e5 100644 --- a/src/eepp/graphics/cshader.cpp +++ b/src/eepp/graphics/cshader.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/src/eepp/graphics/cshaderprogram.cpp b/src/eepp/graphics/cshaderprogram.cpp index 49a8adb19..33ae25141 100644 --- a/src/eepp/graphics/cshaderprogram.cpp +++ b/src/eepp/graphics/cshaderprogram.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/ctextcache.cpp b/src/eepp/graphics/ctextcache.cpp index daaf79677..778c6db67 100644 --- a/src/eepp/graphics/ctextcache.cpp +++ b/src/eepp/graphics/ctextcache.cpp @@ -1,6 +1,7 @@ #include #include #include +#include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/ctexture.cpp b/src/eepp/graphics/ctexture.cpp index 3a1763506..8c591a5a2 100755 --- a/src/eepp/graphics/ctexture.cpp +++ b/src/eepp/graphics/ctexture.cpp @@ -2,6 +2,7 @@ #include #include #include +#include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/ctexturefactory.cpp b/src/eepp/graphics/ctexturefactory.cpp index 545ab4ad0..df031a1f5 100755 --- a/src/eepp/graphics/ctexturefactory.cpp +++ b/src/eepp/graphics/ctexturefactory.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include @@ -171,12 +171,12 @@ const bool& cTextureFactory::IsErasing() const { return mErasing; } -GLint cTextureFactory::GetCurrentTexture( const Uint32& TextureUnit ) const { +int cTextureFactory::GetCurrentTexture( const Uint32& TextureUnit ) const { eeASSERT( TextureUnit < EE_MAX_TEXTURE_UNITS ); return mCurrentTexture[ TextureUnit ]; } -void cTextureFactory::SetCurrentTexture( const GLint& TexId, const Uint32& TextureUnit ) { +void cTextureFactory::SetCurrentTexture( const int& TexId, const Uint32& TextureUnit ) { eeASSERT( TextureUnit < EE_MAX_TEXTURE_UNITS ); mCurrentTexture[ TextureUnit ] = TexId; } diff --git a/src/eepp/graphics/ctextureloader.cpp b/src/eepp/graphics/ctextureloader.cpp index 12ed1bc06..0e890a62d 100644 --- a/src/eepp/graphics/ctextureloader.cpp +++ b/src/eepp/graphics/ctextureloader.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/eepp/graphics/cvertexbuffer.cpp b/src/eepp/graphics/cvertexbuffer.cpp index 21e8c3882..eb0055804 100644 --- a/src/eepp/graphics/cvertexbuffer.cpp +++ b/src/eepp/graphics/cvertexbuffer.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include using namespace EE::Graphics::Private; diff --git a/src/eepp/graphics/cvertexbufferogl.cpp b/src/eepp/graphics/cvertexbufferogl.cpp index 6a5ec4e6a..bfde36abb 100644 --- a/src/eepp/graphics/cvertexbufferogl.cpp +++ b/src/eepp/graphics/cvertexbufferogl.cpp @@ -1,5 +1,5 @@ #include -#include +#include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/cvertexbuffervbo.cpp b/src/eepp/graphics/cvertexbuffervbo.cpp index 50fe7885a..77e2db846 100644 --- a/src/eepp/graphics/cvertexbuffervbo.cpp +++ b/src/eepp/graphics/cvertexbuffervbo.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/glhelper.cpp b/src/eepp/graphics/glhelper.cpp index 47924b00e..27fabce6b 100644 --- a/src/eepp/graphics/glhelper.cpp +++ b/src/eepp/graphics/glhelper.cpp @@ -1,2 +1,2 @@ -#include +#include diff --git a/src/eepp/physics/constraints/cdampedspring.cpp b/src/eepp/physics/constraints/cdampedspring.cpp index 9017331db..1594144ff 100644 --- a/src/eepp/physics/constraints/cdampedspring.cpp +++ b/src/eepp/physics/constraints/cdampedspring.cpp @@ -1,7 +1,7 @@ #include #ifdef PHYSICS_RENDERER_ENABLED -#include +#include #include using namespace EE::Graphics; #endif diff --git a/src/eepp/physics/cshapesegment.cpp b/src/eepp/physics/cshapesegment.cpp index 2f89c9aca..93cf26754 100644 --- a/src/eepp/physics/cshapesegment.cpp +++ b/src/eepp/physics/cshapesegment.cpp @@ -3,7 +3,7 @@ #include #ifdef PHYSICS_RENDERER_ENABLED -#include +#include #include using namespace EE::Graphics; #endif diff --git a/src/eepp/ui/cuicontrolanim.cpp b/src/eepp/ui/cuicontrolanim.cpp index 94e3b0cfb..f3ac78b2d 100644 --- a/src/eepp/ui/cuicontrolanim.cpp +++ b/src/eepp/ui/cuicontrolanim.cpp @@ -1,5 +1,6 @@ #include #include +#include namespace EE { namespace UI { diff --git a/src/eepp/ui/cuitextinput.cpp b/src/eepp/ui/cuitextinput.cpp index a92dd3cbc..a2c8eb374 100644 --- a/src/eepp/ui/cuitextinput.cpp +++ b/src/eepp/ui/cuitextinput.cpp @@ -1,6 +1,7 @@ #include #include #include +#include namespace EE { namespace UI { diff --git a/src/eepp/window/backend/SDL/cwindowsdl.cpp b/src/eepp/window/backend/SDL/cwindowsdl.cpp index 4dbbf5edb..9d5ce9bc3 100644 --- a/src/eepp/window/backend/SDL/cwindowsdl.cpp +++ b/src/eepp/window/backend/SDL/cwindowsdl.cpp @@ -8,17 +8,19 @@ #include #endif +#include + #include #include #include +#include +#include #include #include #include #include #include -#include -#include namespace EE { namespace Window { namespace Backend { namespace SDL { diff --git a/src/eepp/window/backend/SDL2/cwindowsdl2.cpp b/src/eepp/window/backend/SDL2/cwindowsdl2.cpp index 8b13a864e..80305ee80 100644 --- a/src/eepp/window/backend/SDL2/cwindowsdl2.cpp +++ b/src/eepp/window/backend/SDL2/cwindowsdl2.cpp @@ -13,6 +13,7 @@ #include #include #include +#include namespace EE { namespace Window { namespace Backend { namespace SDL2 { diff --git a/src/eepp/window/backend/SFML/cwindowsfml.cpp b/src/eepp/window/backend/SFML/cwindowsfml.cpp index f5b85bc31..dbeb85233 100644 --- a/src/eepp/window/backend/SFML/cwindowsfml.cpp +++ b/src/eepp/window/backend/SFML/cwindowsfml.cpp @@ -1,12 +1,15 @@ #include + +#ifdef EE_BACKEND_SFML_ACTIVE + +#include + #include #include #include #include -#ifdef EE_BACKEND_SFML_ACTIVE - -#include +#include namespace EE { namespace Window { namespace Backend { namespace SFML { diff --git a/src/eepp/window/backend/allegro5/cwindowal.cpp b/src/eepp/window/backend/allegro5/cwindowal.cpp index e50d079f8..ffd65c36a 100644 --- a/src/eepp/window/backend/allegro5/cwindowal.cpp +++ b/src/eepp/window/backend/allegro5/cwindowal.cpp @@ -2,6 +2,9 @@ #ifdef EE_BACKEND_ALLEGRO_ACTIVE +#include + +#include #include #include #include @@ -9,6 +12,9 @@ #include #include +#include +#include +#include #if EE_PLATFORM == EE_PLATFORM_WIN #include @@ -22,11 +28,6 @@ #include #include -#include -#include -#include -#include - namespace EE { namespace Window { namespace Backend { namespace Al { #if defined( EE_X11_PLATFORM ) diff --git a/src/eepp/window/cengine.cpp b/src/eepp/window/cengine.cpp index 893e49fe3..008f14862 100755 --- a/src/eepp/window/cengine.cpp +++ b/src/eepp/window/cengine.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/eepp/window/cwindow.cpp b/src/eepp/window/cwindow.cpp index 963fe6520..7d53f5ac7 100644 --- a/src/eepp/window/cwindow.cpp +++ b/src/eepp/window/cwindow.cpp @@ -2,10 +2,14 @@ #include #include #include +#include + +#include #include #include -#include + #include + #include #ifdef EE_GLES1_LATE_INCLUDE