[Fix] (MG_State/Buffer): pass PingPong test

This commit is contained in:
2025-07-19 22:00:01 +08:00
parent 6f455bc26a
commit 16697b8c2b
5 changed files with 20 additions and 13 deletions
@@ -5,6 +5,12 @@ namespace MobileGL {
namespace GLState {
class BufferState {
public:
BufferState() {
for (SizeT i = 0; i < (SizeT)BufferTarget::BufferTargetCount; ++i) {
m_bindingSlots[i] = BindingSlot<BufferObject>((BufferTarget)i);
}
}
SharedPtr<BufferObject> GetBufferObject(Uint index);
Vector<Uint> GenerateNames(Uint number);
SharedPtr<BufferObject> CreateBufferObject(Uint index);
@@ -13,7 +19,7 @@ namespace MobileGL {
private:
UnorderedMap<Uint, SharedPtr<BufferObject>> m_bufferObjects;
IndexGenerator<Uint> m_indexGenerator;
Vector<BindingSlot<BufferObject>> m_bindingSlots;
Array<BindingSlot<BufferObject>, (SizeT)BufferTarget::BufferTargetCount> m_bindingSlots;
};
}
}