[Fix] (MG_State/Texture, MG_State/Framebuffer): add stub for glCopyTexSubImage2D, glDrawBuffer, glDrawBuffers and glReadBuffer

This commit is contained in:
2025-07-08 11:05:59 +08:00
parent 20d02b75e1
commit 532ca5ced5
7 changed files with 31 additions and 8 deletions
@@ -582,4 +582,22 @@ namespace MG_GL::GL {
MG_Diligent::g_pContext->CopyTexture(CopyAttribs);
}
}
void DrawBuffer(GLenum buf) {
MG_Util::Debug::LogD("glDrawBuffer, buf: %s", MG_Util::Debug::GLEnumToString(buf));
}
void DrawBuffers(GLsizei n, const GLenum *bufs) {
MG_Util::Debug::LogD("glDrawBuffers, n: %d, bufs: [", n);
for (int i = 0; i < n; ++i) {
MG_Util::Debug::LogD("%s,", MG_Util::Debug::GLEnumToString(bufs[i]));
}
MG_Util::Debug::LogD("]");
}
void ReadBuffer(GLenum buf) {
MG_Util::Debug::LogD("glReadBuffer, buf: %s", MG_Util::Debug::GLEnumToString(buf));
}
}
@@ -16,6 +16,9 @@ namespace MG_GL::GL {
void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
GLenum CheckFramebufferStatus(GLenum target);
void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
void DrawBuffer(GLenum buf);
void DrawBuffers(GLsizei n, const GLenum *bufs);
void ReadBuffer(GLenum mode);
}
#endif //MOBILEGL_GL_FRAMEBUFFER_H