#ifndef CVERTEXARRAYMANAGER_H #define CVERTEXARRAYMANAGER_H #include "CDynamicVertexBuffer.h" #include "CVertexBuffer.h" #include #include #include class CVertexArrayManager { std::unordered_map mVBOMap; std::unordered_map mDynamicVBOMap; u32 mVectorIndex; static std::vector sVAManagers; static CVertexArrayManager *spCurrentManager; public: CVertexArrayManager(); ~CVertexArrayManager(); void SetCurrent(); void BindVAO(CVertexBuffer *pVBO); void BindVAO(CDynamicVertexBuffer *pVBO); void DeleteVAO(CVertexBuffer *pVBO); void DeleteVAO(CDynamicVertexBuffer *pVBO); static CVertexArrayManager* Current(); static void DeleteAllArraysForVBO(CVertexBuffer *pVBO); static void DeleteAllArraysForVBO(CDynamicVertexBuffer *pVBO); }; #endif // CVERTEXARRAYMANAGER_H