diff --git a/MG/Includes.h b/MG/Includes.h index 16e1b665..4e9d0d69 100644 --- a/MG/Includes.h +++ b/MG/Includes.h @@ -1,90 +1,9 @@ // // Created by BZLZHH on 2025/3/15. // +#pragma once -#include "Constants.h" #define BACKEND_TYPE BACKEND_DILIGENT -#include "Global.h" -#ifndef MOBILEGL_GLES_LOADER_H -#include "MG_GL/BackendLoader/GLES/Loader.h" -#endif -#ifndef MOBILEGL_GL_FRAMEBUFFER_H -#include "MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h" -#endif -#ifndef MOBILEGL_GL_GETTER_H -#include "MG_GL/Implementations/GL/Getter/GL_Getter.h" -#endif -#ifndef MOBILEGL_BACKENDINFO_H -#include "MG_GL/Implementations/GL/Getter/BackendInfo.h" -#endif -#ifndef MOBILEGL_GL_BUFFER_H -#include "MG_GL/Implementations/GL/Buffer/GL_Buffer.h" -#endif -#ifndef MOBILEGL_GL_DRAWING_H -#include "MG_GL/Implementations/GL/Drawing/GL_Drawing.h" -#endif -#ifndef MOBILEGL_GL_PROGRAM_H -#include "MG_GL/Implementations/GL/Program/GL_Program.h" -#endif -#ifndef MOBILEGL_GL_TEXTURE_H -#include "MG_GL/Implementations/GL/Texture/GL_Texture.h" -#endif -#ifndef MOBILEGL_GL_VERTEXARRAY_H -#include "MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h" -#endif -#ifndef MOBILEGL_DILIGENT_EGL_IMPL_H -#include "MG_GL/Implementations/EGL/Diligent/EGL_impl.h" -#endif -#ifndef MOBILEGL_GLSTATE_H -#include "MG_GL/State/Core/GLState.h" -#endif -#ifndef MOBILEGL_COMMONSTATE_H -#include "MG_GL/State/Common/CommonState.h" -#endif -#ifndef MOBILEGL_TEXTURESTATE_H -#include "MG_GL/State/Texture/TextureState.h" -#endif -#ifndef MOBILEGL_VERTEXARRAYSTATE_H -#include "MG_GL/State/VertexArray/VertexArrayState.h" -#endif -#ifndef MOBILEGL_BUFFERSTATE_H -#include "MG_GL/State/Buffer/BufferState.h" -#endif -#ifndef MOBILEGL_SHADEROBJECT_H -#include "MG_GL/State/Program/ShaderObject.h" -#endif -#ifndef MOBILEGL_PROGRAMSTATE_H -#include "MG_GL/State/Program/ProgramState.h" -#endif -#ifndef MOBILEGL_FRAMEBUFFERSTATE_H -#include "MG_GL/State/Framebuffer/FramebufferState.h" -#endif -#ifndef MOBILEGL_LOOKUP_H -#include "MG_GL/Implementations/GLX/LookUp/LookUp.h" -#endif -#ifndef MOBILEGL_DEBUG_H -#include "MG_UTIL/Debug/Debug.h" -#endif -#ifndef MOBILEGL_GLSLTOOL_H -#include "MG_UTIL/Program/GLSLTool.h" -#endif -#ifndef MOBILEGL_PROGRAM_DEBUGTOOL_H -#include "MG_UTIL/Program/DebugTool.h" -#endif -#ifndef MOBILEGL_GL_COMMON_H -#include "MG_GL/Implementations/GL/Common/GL_Common.h" -#endif -#ifndef MOBILEGL_EGL_VK_EMU_H -#include "MG_GL/Implementations/EGL/VK/EGL_EMU.h" -#endif -#ifndef MOBILEGL_EGL_GLES_EGL_WRAP_H -#include "MG_GL/Implementations/EGL/GLES/EGL_WRAP.h" -#endif -#ifndef MOBILEGL_TESTDRAWING_H -#include "MG_RHI/GLES/Test/TestDrawing.h" -#endif - -#include "MG_GL/Implementations/EGL/Diligent/DiligentConfig.h" #include #include @@ -157,3 +76,34 @@ #include "GraphicsTypes.h" #include "DeviceContext.h" #endif + + +#include "Constants.h" +#include "Global.h" +#include "MG_GL/Implementations/EGL/Diligent/DiligentConfig.h" +#include "MG_GL/BackendLoader/GLES/Loader.h" +#include "MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h" +#include "MG_GL/Implementations/GL/Getter/GL_Getter.h" +#include "MG_GL/Implementations/GL/Getter/BackendInfo.h" +#include "MG_GL/Implementations/GL/Buffer/GL_Buffer.h" +#include "MG_GL/Implementations/GL/Drawing/GL_Drawing.h" +#include "MG_GL/Implementations/GL/Program/GL_Program.h" +#include "MG_GL/Implementations/GL/Texture/GL_Texture.h" +#include "MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h" +#include "MG_GL/State/Common/CommonState.h" +#include "MG_GL/State/Texture/TextureState.h" +#include "MG_GL/State/VertexArray/VertexArrayState.h" +#include "MG_GL/State/Buffer/BufferState.h" +#include "MG_GL/State/Program/ShaderObject.h" +#include "MG_GL/State/Program/ProgramState.h" +#include "MG_GL/State/Framebuffer/FramebufferState.h" +#include "MG_GL/State/Core/GLState.h" +#include "MG_GL/Implementations/EGL/Diligent/EGL_impl.h" +#include "MG_GL/Implementations/GLX/LookUp/LookUp.h" +#include "MG_UTIL/Debug/Debug.h" +#include "MG_UTIL/Program/GLSLTool.h" +#include "MG_UTIL/Program/DebugTool.h" +#include "MG_GL/Implementations/GL/Common/GL_Common.h" +#include "MG_GL/Implementations/EGL/VK/EGL_EMU.h" +#include "MG_GL/Implementations/EGL/GLES/EGL_WRAP.h" +#include "MG_RHI/GLES/Test/TestDrawing.h" diff --git a/MG/MG_GL/BackendLoader/GLES/Loader.cpp b/MG/MG_GL/BackendLoader/GLES/Loader.cpp index d97ad943..5cc53e92 100644 --- a/MG/MG_GL/BackendLoader/GLES/Loader.cpp +++ b/MG/MG_GL/BackendLoader/GLES/Loader.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/4/26. // -#include "Loader.h" +#include "../../../Includes.h" #if BACKEND_TYPE == BACKEND_GLES diff --git a/MG/MG_GL/BackendLoader/GLES/Loader.h b/MG/MG_GL/BackendLoader/GLES/Loader.h index 3f206ff0..4d4ff4e7 100644 --- a/MG/MG_GL/BackendLoader/GLES/Loader.h +++ b/MG/MG_GL/BackendLoader/GLES/Loader.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_GLES_LOADER_H #define MOBILEGL_GLES_LOADER_H -#include "../../../Includes.h" - #if BACKEND_TYPE == BACKEND_GLES #define APIENTRY_GLES diff --git a/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h b/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h index 24c1c409..01e53e08 100644 --- a/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h +++ b/MG/MG_GL/Implementations/EGL/Diligent/DiligentConfig.h @@ -3,7 +3,6 @@ // #pragma once -#include "../../../../Includes.h" namespace MG_Diligent { inline const int DILIGENT_BACKEND_TYPE = MG_Constants::Backend::BACKEND_DILIGENT_VULKAN; diff --git a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp index 347b220f..be7ac186 100644 --- a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp +++ b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.cpp @@ -2,10 +2,6 @@ // Created by Swung 0x48 on 2025-05-18. // -#include "EGL_impl.h" - -#undef MOBILEGL_GLSLTOOL_H -#undef MOBILEGL_PROGRAM_DEBUGTOOL_H #include "../../../../Includes.h" typedef Diligent::IEngineFactoryVk* (*Diligent_GetEngineFactoryVk_t)(); diff --git a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h index 7b78513d..1c185752 100644 --- a/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h +++ b/MG/MG_GL/Implementations/EGL/Diligent/EGL_impl.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_DILIGENT_EGL_IMPL_H #define MOBILEGL_DILIGENT_EGL_IMPL_H -#include "../../../../Includes.h" - #if BACKEND_TYPE == BACKEND_DILIGENT namespace MG_Diligent { diff --git a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp b/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp index 1cd65dd4..217bda16 100644 --- a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp +++ b/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/4/26. // -#include "EGL_WRAP.h" +#include "../../../../Includes.h" #if BACKEND_TYPE == BACKEND_GLES diff --git a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.h b/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.h index 1407ad19..2348eadd 100644 --- a/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.h +++ b/MG/MG_GL/Implementations/EGL/GLES/EGL_WRAP.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_EGL_GLES_EGL_WRAP_H #define MOBILEGL_EGL_GLES_EGL_WRAP_H -#include "../../../../Includes.h" - #if BACKEND_TYPE == BACKEND_GLES diff --git a/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.cpp b/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.cpp index f91399a8..1ead1a72 100644 --- a/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.cpp +++ b/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/30. // -#include "EGL_EMU.h" +#include "../../../../Includes.h" #if BACKEND_TYPE == BACKEND_VULKAN diff --git a/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.h b/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.h index 228f426b..de0dc7db 100644 --- a/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.h +++ b/MG/MG_GL/Implementations/EGL/VK/EGL_EMU.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_EGL_VK_EMU_H #define MOBILEGL_EGL_VK_EMU_H -#include "../../../../Includes.h" - #if BACKEND_TYPE == BACKEND_VULKAN struct EGLInternalConfig { diff --git a/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.cpp b/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.cpp index e455f9db..8b49bf9b 100644 --- a/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.cpp +++ b/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/15. // -#include "GL_Buffer.h" +#include "../../../../Includes.h" namespace MG_GL::GL { Diligent::VALUE_TYPE ConvertGLIndexTypeToDiligent(GLenum type) { diff --git a/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.h b/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.h index 029d820d..4b2d1a8b 100644 --- a/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.h +++ b/MG/MG_GL/Implementations/GL/Buffer/GL_Buffer.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_GL_BUFFER_H #define MOBILEGL_GL_BUFFER_H -#include "../../../../Includes.h" - namespace MG_GL::GL { void* MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); void FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length); diff --git a/MG/MG_GL/Implementations/GL/Common/GL_Common.cpp b/MG/MG_GL/Implementations/GL/Common/GL_Common.cpp index 7394f947..46feb169 100644 --- a/MG/MG_GL/Implementations/GL/Common/GL_Common.cpp +++ b/MG/MG_GL/Implementations/GL/Common/GL_Common.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/15. // -#include "GL_Common.h" +#include "../../../../Includes.h" namespace MG_GL::GL { void CreateRenderPassAndFramebuffer(GLuint framebuffer, diff --git a/MG/MG_GL/Implementations/GL/Common/GL_Common.h b/MG/MG_GL/Implementations/GL/Common/GL_Common.h index bb0a4e91..c1a2b518 100644 --- a/MG/MG_GL/Implementations/GL/Common/GL_Common.h +++ b/MG/MG_GL/Implementations/GL/Common/GL_Common.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_GL_COMMON_H #define MOBILEGL_GL_COMMON_H -#include "../../../../Includes.h" - namespace MG_GL::GL { void ClearDepth(GLdouble depth); void ClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); diff --git a/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.cpp b/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.cpp index a3896da3..c49f9884 100644 --- a/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.cpp +++ b/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/15. // -#include "GL_Drawing.h" +#include "../../../../Includes.h" namespace MG_GL::GL { // void CreateRenderPassAndFramebuffer(GLuint framebuffer, diff --git a/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.h b/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.h index 3a2e4df6..9edf4bca 100644 --- a/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.h +++ b/MG/MG_GL/Implementations/GL/Drawing/GL_Drawing.h @@ -4,7 +4,6 @@ #ifndef MOBILEGL_GL_DRAWING_H #define MOBILEGL_GL_DRAWING_H -#include "../../../../Includes.h" namespace MG_GL::GL { bool IsSamplerType(GLenum type); diff --git a/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.cpp b/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.cpp index b1768d67..d75e0cba 100644 --- a/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.cpp +++ b/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/15. // -#include "GL_Framebuffer.h" +#include "../../../../Includes.h" namespace MG_GL::GL { void ReleaseFramebufferResources(MG_Diligent::GLFramebufferInfo& fbInfo) { diff --git a/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h b/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h index 409b612e..d3809022 100644 --- a/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h +++ b/MG/MG_GL/Implementations/GL/Framebuffer/GL_Framebuffer.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_GL_FRAMEBUFFER_H #define MOBILEGL_GL_FRAMEBUFFER_H -#include "../../../../Includes.h" - namespace MG_GL::GL { void UpdateDefaultFramebuffer(); diff --git a/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.cpp b/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.cpp index 90ad8def..2c409b3c 100644 --- a/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.cpp +++ b/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/15. // -#include "GLFuncsDefinitions.h" +#include "../../../../Includes.h" #define DECLARE_GL_FUNCTION_STUB_HEAD(type,name,...) \ MG_EXPORT type gl##name(__VA_ARGS__) { diff --git a/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.h b/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.h index c6e96b4c..2fe14a25 100644 --- a/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.h +++ b/MG/MG_GL/Implementations/GL/GLFuncsDefinitions/GLFuncsDefinitions.h @@ -5,6 +5,4 @@ #ifndef MOBILEGL_GL_FUNCS_DEFINITIONS_H #define MOBILEGL_GL_FUNCS_DEFINITIONS_H -#include "../../../../Includes.h" - #endif //MOBILEGL_GL_FUNCS_DEFINITIONS_H diff --git a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp b/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp index 4f31f2ba..84dd8052 100644 --- a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp +++ b/MG/MG_GL/Implementations/GL/Getter/BackendInfo.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/15. // -#include "BackendInfo.h" +#include "../../../../Includes.h" namespace MG_GL::Getter { const std::string GetBackendName() { diff --git a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.h b/MG/MG_GL/Implementations/GL/Getter/BackendInfo.h index d44c9af3..9004d82b 100644 --- a/MG/MG_GL/Implementations/GL/Getter/BackendInfo.h +++ b/MG/MG_GL/Implementations/GL/Getter/BackendInfo.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_BACKENDINFO_H #define MOBILEGL_BACKENDINFO_H -#include "../../../../Includes.h" - namespace MG_GL::Getter { const std::string GetGPUName(); const std::string GetBackendName(); diff --git a/MG/MG_GL/Implementations/GL/Getter/GL_Getter.cpp b/MG/MG_GL/Implementations/GL/Getter/GL_Getter.cpp index 2ca5b160..247bb4d5 100644 --- a/MG/MG_GL/Implementations/GL/Getter/GL_Getter.cpp +++ b/MG/MG_GL/Implementations/GL/Getter/GL_Getter.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/15. // -#include "GL_Getter.h" +#include "../../../../Includes.h" namespace MG_GL::GL { static std::string rendererString; diff --git a/MG/MG_GL/Implementations/GL/Getter/GL_Getter.h b/MG/MG_GL/Implementations/GL/Getter/GL_Getter.h index 36c40c68..b7d22dc4 100644 --- a/MG/MG_GL/Implementations/GL/Getter/GL_Getter.h +++ b/MG/MG_GL/Implementations/GL/Getter/GL_Getter.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_GL_GETTER_H #define MOBILEGL_GL_GETTER_H -#include "../../../../Includes.h" - namespace MG_GL::GL { const GLubyte* GetString(GLenum name); const GLubyte* GetStringi(GLenum name, GLuint index); diff --git a/MG/MG_GL/Implementations/GL/Program/GL_Program.cpp b/MG/MG_GL/Implementations/GL/Program/GL_Program.cpp index f50aee9c..72a2995a 100644 --- a/MG/MG_GL/Implementations/GL/Program/GL_Program.cpp +++ b/MG/MG_GL/Implementations/GL/Program/GL_Program.cpp @@ -2,9 +2,6 @@ // Created by BZLZHH on 2025/3/15. // -#include "GL_Program.h" - -#undef MOBILEGL_GLSLTOOL_H #include "../../../../Includes.h" namespace MG_GL::GL { diff --git a/MG/MG_GL/Implementations/GL/Program/GL_Program.h b/MG/MG_GL/Implementations/GL/Program/GL_Program.h index 59ce953b..ba942f87 100644 --- a/MG/MG_GL/Implementations/GL/Program/GL_Program.h +++ b/MG/MG_GL/Implementations/GL/Program/GL_Program.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_GL_PROGRAM_H #define MOBILEGL_GL_PROGRAM_H -#include "../../../../Includes.h" - namespace MG_GL::GL { Diligent::VALUE_TYPE ConvertGLTypeToDiligent(GLenum type); diff --git a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp index 8c6fd1c6..d2348aac 100644 --- a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp +++ b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/15. // -#include "GL_Texture.h" +#include "../../../../Includes.h" namespace MG_GL::GL { diff --git a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.h b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.h index 7412ae28..27077812 100644 --- a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.h +++ b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_GL_TEXTURE_H #define MOBILEGL_GL_TEXTURE_H -#include "../../../../Includes.h" - namespace MG_GL::GL { void ActiveTexture(GLenum texture); void BindTexture(GLenum target, GLuint texture); diff --git a/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.cpp b/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.cpp index 1f28e37e..7a2ace90 100644 --- a/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.cpp +++ b/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/3/15. // -#include "GL_VertexArray.h" +#include "../../../../Includes.h" namespace MG_GL::GL { void GenVertexArrays(GLsizei n, GLuint* arrays) { diff --git a/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h b/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h index 4fbbe634..23f193bd 100644 --- a/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h +++ b/MG/MG_GL/Implementations/GL/VertexArray/GL_VertexArray.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_GL_VERTEXARRAY_H #define MOBILEGL_GL_VERTEXARRAY_H -#include "../../../../Includes.h" - namespace MG_GL::GL { void GenVertexArrays(GLsizei n, GLuint* arrays); void BindVertexArray(GLuint array); diff --git a/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.cpp b/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.cpp index a3b442ee..21aa8021 100644 --- a/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.cpp +++ b/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.cpp @@ -2,7 +2,7 @@ // Created by Swung 0x48 on 2025/6/20. // -#include "GLXFuncsDefinitions.h" +#include "../../../../Includes.h" MG_EXPORT void* glXGetProcAddress(const char *name) { return MG_GL::GLX::GetProcAddress(name); diff --git a/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.h b/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.h index 13ddb755..dc140231 100644 --- a/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.h +++ b/MG/MG_GL/Implementations/GLX/GLXFuncsDefinitions/GLXFuncsDefinitions.h @@ -5,6 +5,4 @@ #ifndef MOBILEGL_GLX_FUNCS_DEFINITIONS_H #define MOBILEGL_GLX_FUNCS_DEFINITIONS_H -#include "../../../../Includes.h" - #endif //MOBILEGL_GLX_FUNCS_DEFINITIONS_H diff --git a/MG/MG_GL/State/Buffer/BufferState.cpp b/MG/MG_GL/State/Buffer/BufferState.cpp index a18e0487..60504e25 100644 --- a/MG/MG_GL/State/Buffer/BufferState.cpp +++ b/MG/MG_GL/State/Buffer/BufferState.cpp @@ -4,7 +4,7 @@ // TODO: Add more gl error check for buffer state manager. -#include "BufferState.h" +#include "../../../Includes.h" //GLenum BufferState::GenName(GLuint *buffer) { // MG_Util::Debug::LogD("MG_State: Buffer: GenName"); diff --git a/MG/MG_GL/State/Buffer/BufferState.h b/MG/MG_GL/State/Buffer/BufferState.h index 60f9b1be..98f14aa6 100644 --- a/MG/MG_GL/State/Buffer/BufferState.h +++ b/MG/MG_GL/State/Buffer/BufferState.h @@ -4,10 +4,6 @@ #ifndef MOBILEGL_BUFFERSTATE_H #define MOBILEGL_BUFFERSTATE_H -#define MOBILEGL_GLSTATE_H -#define MOBILEGL_DILIGENT_EGL_IMPL_H - -#include "../../../Includes.h" class BufferState { public: diff --git a/MG/MG_GL/State/Common/CommonState.cpp b/MG/MG_GL/State/Common/CommonState.cpp index f9c61cef..64051849 100644 --- a/MG/MG_GL/State/Common/CommonState.cpp +++ b/MG/MG_GL/State/Common/CommonState.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/4/30. // -#include "CommonState.h" +#include "../../../Includes.h" CommonState::CommonState() { pixelStoreParams[GL_PACK_ALIGNMENT] = 4; diff --git a/MG/MG_GL/State/Common/CommonState.h b/MG/MG_GL/State/Common/CommonState.h index 68b47756..004b5653 100644 --- a/MG/MG_GL/State/Common/CommonState.h +++ b/MG/MG_GL/State/Common/CommonState.h @@ -4,10 +4,6 @@ #ifndef MOBILEGL_COMMONSTATE_H #define MOBILEGL_COMMONSTATE_H -#define MOBILEGL_GLSTATE_H -#define MOBILEGL_DILIGENT_EGL_IMPL_H - -#include "../../../Includes.h" class CommonState { public: diff --git a/MG/MG_GL/State/Core/GLState.cpp b/MG/MG_GL/State/Core/GLState.cpp index da4c7307..ece59583 100644 --- a/MG/MG_GL/State/Core/GLState.cpp +++ b/MG/MG_GL/State/Core/GLState.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/4/4. // -#include "GLState.h" +#include "../../../Includes.h" std::queue MG_State_T::glErrorQueue; TextureState* MG_State_T::textureState = nullptr; diff --git a/MG/MG_GL/State/Core/GLState.h b/MG/MG_GL/State/Core/GLState.h index 9871df47..31017df7 100644 --- a/MG/MG_GL/State/Core/GLState.h +++ b/MG/MG_GL/State/Core/GLState.h @@ -4,9 +4,6 @@ #ifndef MOBILEGL_GLSTATE_H #define MOBILEGL_GLSTATE_H -#define MOBILEGL_DILIGENT_EGL_IMPL_H - -#include "../../../Includes.h" struct MG_State_T { static std::queue glErrorQueue; diff --git a/MG/MG_GL/State/Framebuffer/FramebufferState.cpp b/MG/MG_GL/State/Framebuffer/FramebufferState.cpp index ccd9a169..3bbce11c 100644 --- a/MG/MG_GL/State/Framebuffer/FramebufferState.cpp +++ b/MG/MG_GL/State/Framebuffer/FramebufferState.cpp @@ -5,10 +5,6 @@ // TODO: Add more gl error check for framebuffer state manager. // TODO: Check if the state machine really meets up to OpenGL 3 standard. -#include "FramebufferState.h" - -// Re-Include Includes.h, cuz of the absence of GLState.h -#undef MOBILEGL_GLSTATE_H #include "../../../Includes.h" GLenum FramebufferState::Create(GLuint* framebuffer) { diff --git a/MG/MG_GL/State/Framebuffer/FramebufferState.h b/MG/MG_GL/State/Framebuffer/FramebufferState.h index 16d606b8..0ca281ad 100644 --- a/MG/MG_GL/State/Framebuffer/FramebufferState.h +++ b/MG/MG_GL/State/Framebuffer/FramebufferState.h @@ -4,10 +4,6 @@ #ifndef MOBILEGL_FRAMEBUFFERSTATE_H #define MOBILEGL_FRAMEBUFFERSTATE_H -#define MOBILEGL_GLSTATE_H -#define MOBILEGL_DILIGENT_EGL_IMPL_H - -#include "../../../Includes.h" struct FramebufferAttachment { GLenum type = GL_NONE; diff --git a/MG/MG_GL/State/Program/ProgramState.cpp b/MG/MG_GL/State/Program/ProgramState.cpp index 745772bb..ee27e8cc 100644 --- a/MG/MG_GL/State/Program/ProgramState.cpp +++ b/MG/MG_GL/State/Program/ProgramState.cpp @@ -4,11 +4,6 @@ // TODO: Add more gl error check for buffer state manager. // TODO: Check if the state machine really meets up to OpenGL 3 standard. -#include "ProgramState.h" - -// Re-Include Includes.h, cuz of the absence of Program/DebugTool.h and Program/GLSLTool.cpp. -#undef MOBILEGL_GLSLTOOL_H -#undef MOBILEGL_PROGRAM_DEBUGTOOL_H #include "../../../Includes.h" ProgramState::ProgramState() { diff --git a/MG/MG_GL/State/Program/ProgramState.h b/MG/MG_GL/State/Program/ProgramState.h index d51f48b1..d08588c1 100644 --- a/MG/MG_GL/State/Program/ProgramState.h +++ b/MG/MG_GL/State/Program/ProgramState.h @@ -4,12 +4,6 @@ #ifndef MOBILEGL_PROGRAMSTATE_H #define MOBILEGL_PROGRAMSTATE_H -#define MOBILEGL_GLSTATE_H -#define MOBILEGL_DILIGENT_EGL_IMPL_H -#define MOBILEGL_PROGRAM_DEBUGTOOL_H -#define MOBILEGL_GLSLTOOL_H - -#include "../../../Includes.h" struct ShaderObject { GLenum type; diff --git a/MG/MG_GL/State/Program/ShaderObject.cpp b/MG/MG_GL/State/Program/ShaderObject.cpp index 6498a167..d0681ed2 100644 --- a/MG/MG_GL/State/Program/ShaderObject.cpp +++ b/MG/MG_GL/State/Program/ShaderObject.cpp @@ -2,11 +2,6 @@ // Created by BZLZHH on 2025/5/3. // -#include "ShaderObject.h" - -// Re-Include Includes.h, cuz of the absence of Program/DebugTool.h and Program/GLSLTool.cpp. -#undef MOBILEGL_GLSLTOOL_H -#undef MOBILEGL_PROGRAM_DEBUGTOOL_H #include "../../../Includes.h" GLenum ProgramState::CreateShader(GLenum type, GLuint* shader) { diff --git a/MG/MG_GL/State/Program/ShaderObject.h b/MG/MG_GL/State/Program/ShaderObject.h index be6a661c..835c573c 100644 --- a/MG/MG_GL/State/Program/ShaderObject.h +++ b/MG/MG_GL/State/Program/ShaderObject.h @@ -5,9 +5,4 @@ #ifndef MOBILEGL_SHADEROBJECT_H #define MOBILEGL_SHADEROBJECT_H -#define MOBILEGL_GLSTATE_H -#define MOBILEGL_DILIGENT_EGL_IMPL_H - -#include "../../../Includes.h" - #endif //MOBILEGL_SHADEROBJECT_H diff --git a/MG/MG_GL/State/Texture/TextureState.cpp b/MG/MG_GL/State/Texture/TextureState.cpp index 815f2256..afa00478 100644 --- a/MG/MG_GL/State/Texture/TextureState.cpp +++ b/MG/MG_GL/State/Texture/TextureState.cpp @@ -2,10 +2,6 @@ // Created by BZLZHH on 2025/4/4. // -#include "TextureState.h" - -// Re-Include Includes.h, cuz of the absence of GLState.h -#undef MOBILEGL_GLSTATE_H #include "../../../Includes.h" // TextureObject diff --git a/MG/MG_GL/State/Texture/TextureState.h b/MG/MG_GL/State/Texture/TextureState.h index 0235f43e..d186f85a 100644 --- a/MG/MG_GL/State/Texture/TextureState.h +++ b/MG/MG_GL/State/Texture/TextureState.h @@ -4,10 +4,6 @@ #ifndef MOBILEGL_TEXTURESTATE_H #define MOBILEGL_TEXTURESTATE_H -#define MOBILEGL_GLSTATE_H -#define MOBILEGL_DILIGENT_EGL_IMPL_H - -#include "../../../Includes.h" struct ComponentSizes { GLint red = 0; diff --git a/MG/MG_GL/State/VertexArray/VertexArrayState.cpp b/MG/MG_GL/State/VertexArray/VertexArrayState.cpp index eae9b552..4c24372b 100644 --- a/MG/MG_GL/State/VertexArray/VertexArrayState.cpp +++ b/MG/MG_GL/State/VertexArray/VertexArrayState.cpp @@ -4,7 +4,7 @@ // TODO: Add more gl error check for vertex array state manager. -#include "VertexArrayState.h" +#include "../../../Includes.h" VertexArrayState::VertexArrayState() { vaos_[0]; diff --git a/MG/MG_GL/State/VertexArray/VertexArrayState.h b/MG/MG_GL/State/VertexArray/VertexArrayState.h index ac736bac..d925bb5c 100644 --- a/MG/MG_GL/State/VertexArray/VertexArrayState.h +++ b/MG/MG_GL/State/VertexArray/VertexArrayState.h @@ -4,10 +4,6 @@ #ifndef MOBILEGL_VERTEXARRAYSTATE_H #define MOBILEGL_VERTEXARRAYSTATE_H -#define MOBILEGL_GLSTATE_H -#define MOBILEGL_DILIGENT_EGL_IMPL_H - -#include "../../../Includes.h" struct VertexAttribState { bool enabled = false; diff --git a/MG/MG_RHI/GLES/Test/TestDrawing.cpp b/MG/MG_RHI/GLES/Test/TestDrawing.cpp index a8dd9c3d..ead4cc37 100644 --- a/MG/MG_RHI/GLES/Test/TestDrawing.cpp +++ b/MG/MG_RHI/GLES/Test/TestDrawing.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/4/26. // -#include "TestDrawing.h" +#include "../../../Includes.h" namespace MG_RHI::GLES::Test { constexpr int DISPLAY_COLUMNS = 8; diff --git a/MG/MG_RHI/GLES/Test/TestDrawing.h b/MG/MG_RHI/GLES/Test/TestDrawing.h index b586be2e..37f1ad1b 100644 --- a/MG/MG_RHI/GLES/Test/TestDrawing.h +++ b/MG/MG_RHI/GLES/Test/TestDrawing.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_TESTDRAWING_H #define MOBILEGL_TESTDRAWING_H -#include "../../../Includes.h" - namespace MG_RHI::GLES::Test { void DrawAllTextures(); } diff --git a/MG/MG_UTIL/Debug/Debug.cpp b/MG/MG_UTIL/Debug/Debug.cpp index 7c79b411..98238c3c 100644 --- a/MG/MG_UTIL/Debug/Debug.cpp +++ b/MG/MG_UTIL/Debug/Debug.cpp @@ -2,7 +2,6 @@ // Created by BZLZHH on 2025/3/15. // -#include "Debug.h" #include "../../Includes.h" #include "BlendState.h" diff --git a/MG/MG_UTIL/Debug/Debug.h b/MG/MG_UTIL/Debug/Debug.h index f114a47d..eeb185de 100644 --- a/MG/MG_UTIL/Debug/Debug.h +++ b/MG/MG_UTIL/Debug/Debug.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_DEBUG_H #define MOBILEGL_DEBUG_H -#include "../../Includes.h" - #define FORCE_SYNC_WITH_LOG_FILE 0 namespace MG_Util { diff --git a/MG/MG_UTIL/Program/DebugTool.cpp b/MG/MG_UTIL/Program/DebugTool.cpp index 67f765ca..77a53c3f 100644 --- a/MG/MG_UTIL/Program/DebugTool.cpp +++ b/MG/MG_UTIL/Program/DebugTool.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/5/3. // -#include "DebugTool.h" +#include "../../Includes.h" namespace MG_Util::Program { std::string GLTypeToString(GLenum type) { diff --git a/MG/MG_UTIL/Program/DebugTool.h b/MG/MG_UTIL/Program/DebugTool.h index e052257f..74bcc9ff 100644 --- a/MG/MG_UTIL/Program/DebugTool.h +++ b/MG/MG_UTIL/Program/DebugTool.h @@ -4,7 +4,6 @@ #ifndef MOBILEGL_PROGRAM_DEBUGTOOL_H #define MOBILEGL_PROGRAM_DEBUGTOOL_H -#include "../../Includes.h" namespace MG_Util::Program { std::string GLTypeToString(GLenum type); diff --git a/MG/MG_UTIL/Program/GLSLTool.cpp b/MG/MG_UTIL/Program/GLSLTool.cpp index 675415bc..beb44e09 100644 --- a/MG/MG_UTIL/Program/GLSLTool.cpp +++ b/MG/MG_UTIL/Program/GLSLTool.cpp @@ -2,7 +2,7 @@ // Created by BZLZHH on 2025/5/3. // -#include "GLSLTool.h" +#include "../../Includes.h" namespace MG_Util::Program { void RenameGLSLBuiltinsForVulkan(std::string &src) { diff --git a/MG/MG_UTIL/Program/GLSLTool.h b/MG/MG_UTIL/Program/GLSLTool.h index 3fd11a65..60404060 100644 --- a/MG/MG_UTIL/Program/GLSLTool.h +++ b/MG/MG_UTIL/Program/GLSLTool.h @@ -5,8 +5,6 @@ #ifndef MOBILEGL_GLSLTOOL_H #define MOBILEGL_GLSLTOOL_H -#include "../../Includes.h" - namespace MG_Util::Program { inline static TBuiltInResource InitResources() {