[Feat] (BufferState): Implement BufferSubData.

This commit is contained in:
BZLZHH
2025-05-17 00:19:40 +08:00
parent 71df4bae3c
commit 19e2a5dec2
7 changed files with 41 additions and 1 deletions
@@ -163,6 +163,18 @@ namespace MG_GL::GL {
return isValid ? GL_TRUE : GL_FALSE;
}
void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) {
MG_Util::Debug::LogD("glBufferSubData, target: %s, offset: %lld, size: %lld, data: %p",
MG_Util::Debug::GLEnumToString(target),
static_cast<long long>(offset),
static_cast<long long>(size),
data);
GLenum result = MG_State::CommitBufferStorageRegion(target, offset, size, data);
if (result != GL_NO_ERROR) {
MG_State::SetError(result);
MG_Util::Debug::LogE("Error from MG State: %s", MG_Util::Debug::GLEnumToString(result));
}
}
void DeleteBuffers(GLsizei n, const GLuint *buffers) {
MG_Util::Debug::LogD("glDeleteBuffers, n: %d, buffers: %p", n, buffers);