mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 22:28:32 +09:00
[Refactor] (...): Optimize code file structure.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#if BACKEND_TYPE == BACKEND_GLES
|
||||
|
||||
// TODO: Take this code file apart into multiple files.
|
||||
|
||||
#define GL_FUNC_DECL(name) \
|
||||
name##_PTR name;
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
//
|
||||
// Created by BZLZHH on 2025/3/15.
|
||||
//
|
||||
|
||||
#ifndef MOBILEGL_GL_DEF_H
|
||||
#define MOBILEGL_GL_DEF_H
|
||||
|
||||
#include "../../Includes.h"
|
||||
|
||||
#endif //MOBILEGL_GL_DEF_H
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_EGL_GLES_EGL_WRAP_H
|
||||
#define MOBILEGL_EGL_GLES_EGL_WRAP_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
#if BACKEND_TYPE == BACKEND_GLES
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_EGL_VK_EMU_H
|
||||
#define MOBILEGL_EGL_VK_EMU_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
#if BACKEND_TYPE == BACKEND_VULKAN
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_GL_BUFFER_H
|
||||
#define MOBILEGL_GL_BUFFER_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_GL_COMMON_H
|
||||
#define MOBILEGL_GL_COMMON_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
void ClearDepth(::GLdouble depth);
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_GL_DRAWING_H
|
||||
#define MOBILEGL_GL_DRAWING_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
void DrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_GL_FRAMEBUFFER_H
|
||||
#define MOBILEGL_GL_FRAMEBUFFER_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
GLenum CheckFramebufferStatus(GLenum target);
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Created by BZLZHH on 2025/3/15.
|
||||
//
|
||||
|
||||
#include "GL_Def.h"
|
||||
#include "GLFuncsDefinitions.h"
|
||||
|
||||
#define DECLARE_GL_FUNCTION_STUB_HEAD(type,name,...) \
|
||||
MG_EXPORT type gl##name(__VA_ARGS__) {
|
||||
@@ -0,0 +1,10 @@
|
||||
//
|
||||
// Created by BZLZHH on 2025/3/15.
|
||||
//
|
||||
|
||||
#ifndef MOBILEGL_GL_FUNCS_DEFINITIONS_H
|
||||
#define MOBILEGL_GL_FUNCS_DEFINITIONS_H
|
||||
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
#endif //MOBILEGL_GL_FUNCS_DEFINITIONS_H
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_BACKENDINFO_H
|
||||
#define MOBILEGL_BACKENDINFO_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::Getter {
|
||||
const std::string GetBackendName();
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_GL_GETTER_H
|
||||
#define MOBILEGL_GL_GETTER_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
const ::GLubyte* GetString(GLenum name);
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_GL_PROGRAM_H
|
||||
#define MOBILEGL_GL_PROGRAM_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
void GetProgramiv(GLuint program, GLenum pname, GLint *params);
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_GL_SHADER_H
|
||||
#define MOBILEGL_GL_SHADER_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
void GetShaderiv(GLuint shader, GLenum pname, GLint *params);
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_GL_TEXTURE_H
|
||||
#define MOBILEGL_GL_TEXTURE_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
void ActiveTexture(GLenum texture);
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
#ifndef MOBILEGL_GL_VERTEXARRAY_H
|
||||
#define MOBILEGL_GL_VERTEXARRAY_H
|
||||
|
||||
#include "../../../Includes.h"
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
|
||||
#include "LookUp.h"
|
||||
|
||||
#include "../../../Includes.h"
|
||||
|
||||
#define DEBUG 0
|
||||
#include "../../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GLX {
|
||||
void* GetProcAddress(const char *name) {
|
||||
@@ -12,7 +12,7 @@ struct MG_State_T {
|
||||
static TextureState* textureState;
|
||||
static CommonState* commonState;
|
||||
};
|
||||
|
||||
|
||||
namespace MG_State {
|
||||
extern MG_State_T* MG_State_O;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user