[Fix] (MG_State/Buffer): Do not consider GL_DYNAMIC_COPY and GL_STREAM_DRAW as dynamic buffer.

This commit is contained in:
BZLZHH
2025-06-21 11:30:47 +08:00
parent ae5c37b7e4
commit edd1ad1a80
+1 -2
View File
@@ -75,8 +75,7 @@ GLenum BufferState::CommitStorage(GLenum target, GLsizeiptr size, const void* da
MG_Util::Debug::LogD("MG_State: Buffer: CommitStorage get buffer object %u at target 0x%x",it->second,target);
obj.usage = usage;
obj.isDynamic = (usage == GL_DYNAMIC_DRAW || usage == GL_DYNAMIC_READ ||
usage == GL_DYNAMIC_COPY || usage == GL_STREAM_DRAW ||
usage == GL_STREAM_READ || usage == GL_STREAM_COPY);
usage == GL_DYNAMIC_COPY || usage == GL_STREAM_DRAW);
obj.data.resize(size);
if (data) {
memcpy(obj.data.data(), data, size);