mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 05:38:31 +09:00
[Improvement] (HeaderSystem): Optimize header system, highly improving performance.
This commit is contained in:
@@ -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,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:
|
||||
|
||||
@@ -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,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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,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
|
||||
|
||||
@@ -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,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;
|
||||
|
||||
Reference in New Issue
Block a user