[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
@@ -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) {
@@ -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);
@@ -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,
@@ -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);
@@ -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,
@@ -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);
@@ -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) {
@@ -5,8 +5,6 @@
#ifndef MOBILEGL_GL_FRAMEBUFFER_H
#define MOBILEGL_GL_FRAMEBUFFER_H
#include "../../../../Includes.h"
namespace MG_GL::GL {
void UpdateDefaultFramebuffer();
@@ -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__) {
@@ -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
@@ -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() {
@@ -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();
@@ -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;
@@ -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);
@@ -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 {
@@ -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);
@@ -2,7 +2,7 @@
// Created by BZLZHH on 2025/3/15.
//
#include "GL_Texture.h"
#include "../../../../Includes.h"
namespace MG_GL::GL {
@@ -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);
@@ -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) {
@@ -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);