[Feat] (MG_State/GLState): Implement BufferState.

This commit is contained in:
BZLZHH
2025-07-17 13:21:28 +08:00
parent 9604bdd50a
commit ea64124963
6 changed files with 105 additions and 31 deletions
+26
View File
@@ -93,6 +93,32 @@ namespace MobileGL {
}
};
template<typename ObjectType>
class BindingSlot {
public:
using TargetEnum = ObjectType::TargetEnum;
explicit BindingSlot(TargetEnum target)
: m_target(target), m_boundObject(nullptr) {
}
void Bind(SharedPtr<ObjectType> object) {
m_boundObject = object;
}
SharedPtr<ObjectType> GetBoundObject() const {
return m_boundObject;
}
TargetEnum GetTarget() const {
return m_target;
}
private:
TargetEnum m_target;
SharedPtr<ObjectType> m_boundObject;
};
struct Version {
Int Major;
Int Minor;