mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 04:08:32 +09:00
[Fix] (BufferState): Better judgement for obj.isDynamic.
This commit is contained in:
@@ -74,8 +74,9 @@ GLenum BufferState::CommitStorage(GLenum target, GLsizeiptr size, const void* da
|
||||
BufferObject& obj = buffers_[it->second];
|
||||
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);
|
||||
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);
|
||||
obj.data.resize(size);
|
||||
if (data) {
|
||||
memcpy(obj.data.data(), data, size);
|
||||
|
||||
Reference in New Issue
Block a user