michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef VBOARENA_H_ michael@0: #define VBOARENA_H_ michael@0: michael@0: #include "GLTypes.h" michael@0: #include michael@0: michael@0: namespace mozilla { michael@0: namespace gl { michael@0: michael@0: class GLContext; michael@0: michael@0: class VBOArena { michael@0: public: michael@0: // Allocate a new VBO. michael@0: GLuint Allocate(GLContext *aGLContext); michael@0: michael@0: // Re-use previously allocated VBOs. michael@0: void Reset(); michael@0: michael@0: // Throw away all allocated VBOs. michael@0: void Flush(GLContext *aGLContext); michael@0: private: michael@0: std::vector mAllocatedVBOs; michael@0: std::vector mAvailableVBOs; michael@0: }; michael@0: michael@0: } michael@0: } michael@0: michael@0: #endif