[Improvement] (HeaderSystem): Optimize header system, highly improving performance.

This commit is contained in:
BZLZHH
2025-07-10 14:01:09 +08:00
parent 833679e58a
commit 59e0291f9e
56 changed files with 52 additions and 199 deletions
+1 -1
View File
@@ -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");
-4
View File
@@ -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:
+1 -1
View File
@@ -2,7 +2,7 @@
// Created by BZLZHH on 2025/4/30.
//
#include "CommonState.h"
#include "../../../Includes.h"
CommonState::CommonState() {
pixelStoreParams[GL_PACK_ALIGNMENT] = 4;
-4
View File
@@ -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:
+1 -1
View File
@@ -2,7 +2,7 @@
// Created by BZLZHH on 2025/4/4.
//
#include "GLState.h"
#include "../../../Includes.h"
std::queue<GLenum> MG_State_T::glErrorQueue;
TextureState* MG_State_T::textureState = nullptr;
-3
View File
@@ -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<GLenum> glErrorQueue;
@@ -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) {
@@ -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;
-5
View File
@@ -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() {
-6
View File
@@ -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;
-5
View File
@@ -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) {
-5
View File
@@ -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
-4
View File
@@ -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
-4
View File
@@ -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;
@@ -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];
@@ -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;