[Feat] (...): Add FramebufferState while implementing these gl functions.

This commit is contained in:
BZLZHH
2025-05-04 01:17:09 +08:00
parent 03c9531e7a
commit 30beaf6eb9
11 changed files with 337 additions and 6 deletions
+10
View File
@@ -14,6 +14,7 @@ struct MG_State_T {
static BufferState* bufferState;
static VertexArrayState* vertexArrayState;
static ProgramState* programState;
static FramebufferState* framebufferState;
};
namespace MG_State {
@@ -117,6 +118,15 @@ namespace MG_State {
GLuint GetCurrentProgram();
bool SetProgramStatus(GLuint program, GLboolean status);
bool SetShaderStatus(GLuint shader, GLboolean status);
// Framebuffer
GLenum CreateFramebuffer(GLuint* framebuffer);
GLenum CreateFramebuffers(GLsizei n, GLuint* framebuffers);
GLenum DeleteFramebuffer(GLuint framebuffer);
GLenum BindFramebuffer(GLenum target, GLuint framebuffer);
GLenum AttachTexture2DToFramebuffer(GLenum target, GLenum attachment, GLenum textarget,
GLuint texture, GLint level);
GLenum ValidateFramebufferCompleteness(GLenum target);
}