[Feat|Fix|Improvement] (All): Continue building the basic structure.

Feat: implement MG_Impl/Buffer
Feat: implement MG_State/ErrorState and integrate it into MG_State/GLContext
Feat: add buffer deletion management
Feat: introduce `INSERTION_POINT` (https://github.com/MobileGL-Dev/MobileGLCodeManager)
Feat: add tests about MG_Impl/Buffer and buffer deletion feature
Feat: add several converters
Fix: fix some compiling errors
Fix: fix some incorrect behaviors in MG_State/Buffer
Improvement: remove some current statements at the beginning of the source file, which will be added uniformly soon
Improvement: optimize some naming
This commit is contained in:
BZLZHH
2025-07-23 23:04:36 +08:00
parent 06804d94f8
commit e79a2fa809
37 changed files with 1377 additions and 118 deletions
+23 -17
View File
@@ -1,7 +1,7 @@
#pragma once
#ifdef __ANDROID__
#define __ANDROID_API__ 26 // fix pthread_getname_np not defined
#define __ANDROID_API__ 26 // force Android API level to 26 for compatibility
#endif
#ifdef _WIN32
@@ -41,6 +41,7 @@
#include <format>
#include <memory>
#include <bit>
#include <cstdarg>
#include <functional>
#include <expected>
@@ -55,6 +56,9 @@
#include <glm/glm.hpp>
#include <ankerl/unordered_dense.h>
#include <GLES3/gl32.h>
#include <EGL/egl.h>
#include <GL/gl.h>
#include <GL/glext.h>
#ifdef __ANDROID__
#include <android/log.h>
@@ -85,20 +89,16 @@
typedef int android_LogPriority;
int __android_log_print(int prio, const char *tag, const char *fmt, ...);
inline int __android_log_print(int prio, const char* tag, const char* fmt, ...) { }
#endif
#include <EGL/egl.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include "MG_Util/GLExtensions.h"
#include "MG_Util/Types.h"
#include "MG_Util/Miscellany/IndexGenerator.h"
#include "MG_Util/Debug/Log.h"
#include "MG_Util/Converters/GLToStr/GLEnumConverter.h"
#include "MG_Util/Converters/MGToStr/GLExtensionConverter.h"
#include "MG_Util/Converters/GLToGlslang/GLShaderLangConverter.h"
#include "MG_State/GLState/ErrorState/ErrorCode.h"
#include "MG_State/GLState/ErrorState/ErrorInfo.h"
#include "MG_State/GLState/ErrorState/Error.h"
#include "MG_Backend/Backends.h"
@@ -107,14 +107,20 @@ int __android_log_print(int prio, const char *tag, const char *fmt, ...);
#include "MG_Impl/GLXImpl/LookUp/LookUp.h"
#include "MG_Impl/EGLImpl/Temporary/TemporaryEGLImpl.h"
#include "MG_Impl/GLImpl/Getter/GL_Getter.h"
//#include "MG_Util/Pipelines/PipelineExecutor.hpp"
//#include "MG_Util/Pipelines/ShaderCompilationPipeline.h"
// #include "MG_Util/ShaderTranspiler/glslang/UniformTraverser.h"
#include "MG_State/GLState/BufferState/BufferObject.h"
#include "MG_State/GLState/BufferState/BufferState.h"
/* @INSERTION_POINT:HEADER_FILE_GLIMPL@ */
#include "MG_Impl/GLImpl/Getter/GL_Getter.h"
#include "MG_Impl/GLImpl/Buffer/GL_Buffer.h"
#include "MG_Impl/GLImpl/Buffer/Validators.h"
#include "MG_State/GLState/Core.h"
#include "MG_Util/Converters/GLToMG/BufferEnumConverter.h"
#include "MG_Util/Converters/MGToGL/BufferEnumConverter.h"
#include "MG_Util/Converters/MGToGL/ErrorCodeConverter.h"
#include "MG_Util/Converters/GLToStr/GLEnumConverter.h"
#include "MG_Util/Converters/MGToStr/BufferEnumConverter.h"
#include "MG_Util/Converters/MGToStr/GLExtensionConverter.h"
#include "MG_Util/Converters/GLToGlslang/GLShaderLangConverter.h"