mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Feat] (...): Add GLES Backend.
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
//
|
||||
// Created by BZLZHH on 2025/3/15.
|
||||
//
|
||||
|
||||
#include "GL_Command.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
|
||||
}
|
||||
@@ -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
|
||||
@@ -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();
|
||||
};
|
||||
}
|
||||
@@ -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
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
|
||||
void GetProgramiv(GLuint program, GLenum pname, GLint *params);
|
||||
}
|
||||
|
||||
#endif //MOBILEGL_GL_PROGRAM_H
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "../../../Includes.h"
|
||||
|
||||
namespace MG_GL::GL {
|
||||
|
||||
void GetShaderiv(GLuint shader, GLenum pname, GLint *params);
|
||||
}
|
||||
|
||||
#endif //MOBILEGL_GL_SHADER_H
|
||||
|
||||
Reference in New Issue
Block a user