[Feat] (...): Add GLES Backend.

This commit is contained in:
BZLZHH
2025-04-26 12:03:42 +08:00
parent adbadbba30
commit 91fa9e2d01
453 changed files with 70432 additions and 58 deletions
-9
View File
@@ -1,9 +0,0 @@
//
// Created by BZLZHH on 2025/3/15.
//
#include "GL_Command.h"
namespace MG_GL::GL {
}
-14
View File
@@ -1,14 +0,0 @@
//
// Created by BZLZHH on 2025/3/15.
//
#ifndef MOBILEGL_GL_COMMAND_H
#define MOBILEGL_GL_COMMAND_H
#include "../../../Includes.h"
namespace MG_GL::GL {
}
#endif //MOBILEGL_GL_COMMAND_H
+17
View File
@@ -0,0 +1,17 @@
//
// Created by BZLZHH on 2025/3/15.
//
#include "GL_Drawing.h"
namespace MG_GL::GL {
// This is a test function that directly draws textures.
void DrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices) {
::GLES::glViewport(0,0,3200,1440);
MG_RHI::GLES::Test::DrawAllTextures();
};
void DrawArrays(GLenum mode, GLint first, GLsizei count) {
::GLES::glViewport(0,0,3200,1440);
MG_RHI::GLES::Test::DrawAllTextures();
};
}
+15
View File
@@ -0,0 +1,15 @@
//
// Created by BZLZHH on 2025/3/15.
//
#ifndef MOBILEGL_GL_DRAWING_H
#define MOBILEGL_GL_DRAWING_H
#include "../../../Includes.h"
namespace MG_GL::GL {
void DrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
void DrawArrays(GLenum mode, GLint first, GLsizei count);
}
#endif //MOBILEGL_GL_DRAWING_H
+4 -1
View File
@@ -5,5 +5,8 @@
#include "GL_Program.h"
namespace MG_GL::GL {
void GetProgramiv(GLuint program, GLenum pname, GLint *params) {
// TODO: Check if program linking is successful.
*params = GL_TRUE;
}
}
+1 -1
View File
@@ -8,7 +8,7 @@
#include "../../../Includes.h"
namespace MG_GL::GL {
void GetProgramiv(GLuint program, GLenum pname, GLint *params);
}
#endif //MOBILEGL_GL_PROGRAM_H
+4 -1
View File
@@ -5,5 +5,8 @@
#include "GL_Shader.h"
namespace MG_GL::GL {
void GetShaderiv(GLuint shader, GLenum pname, GLint *params) {
// TODO: Check if shader compilation is successful.
*params = GL_TRUE;
}
}
+1 -1
View File
@@ -8,7 +8,7 @@
#include "../../../Includes.h"
namespace MG_GL::GL {
void GetShaderiv(GLuint shader, GLenum pname, GLint *params);
}
#endif //MOBILEGL_GL_SHADER_H