[Feat|Fix|Improvement] (All): Continue building the basic structure.

Feat: implement MG_Impl/Buffer
Feat: implement MG_State/ErrorState and integrate it into MG_State/GLContext
Feat: add buffer deletion management
Feat: introduce `INSERTION_POINT` (https://github.com/MobileGL-Dev/MobileGLCodeManager)
Feat: add tests about MG_Impl/Buffer and buffer deletion feature
Feat: add several converters
Fix: fix some compiling errors
Fix: fix some incorrect behaviors in MG_State/Buffer
Improvement: remove some current statements at the beginning of the source file, which will be added uniformly soon
Improvement: optimize some naming
This commit is contained in:
BZLZHH
2025-07-23 23:04:36 +08:00
parent 06804d94f8
commit e79a2fa809
37 changed files with 1377 additions and 118 deletions
@@ -5,16 +5,15 @@ namespace MobileGL {
namespace GLState {
class BufferState {
public:
BufferState() {
for (SizeT i = 0; i < (SizeT)BufferTarget::BufferTargetCount; ++i) {
m_bindingSlots[i] = BindingSlot<BufferObject>((BufferTarget)i);
}
}
BufferState();
SharedPtr<BufferObject> GetBufferObject(Uint index);
Vector<Uint> GenerateNames(Uint number);
SharedPtr<BufferObject> CreateBufferObject(Uint index);
BindingSlot<BufferObject>& GetBindingSlot(BufferTarget target);
void MarkBufferObjectForDeletion(Uint index);
bool ValidateName(Uint index) const;
bool ValidateBufferObject(Uint index) const;
private:
UnorderedMap<Uint, SharedPtr<BufferObject>> m_bufferObjects;