1 #ifndef COMPONENTS_TERRAIN_BUFFERCACHE_H
2 #define COMPONENTS_TERRAIN_BUFFERCACHE_H
6 #include <osg/PrimitiveSet>
20 osg::ref_ptr<osg::DrawElements>
getIndexBuffer (
unsigned int numVerts,
unsigned int flags);
23 osg::ref_ptr<osg::Vec2Array>
getUVBuffer(
unsigned int numVerts);
std::map< std::pair< int, int >, osg::ref_ptr< osg::DrawElements > > mIndexBufferMap
Definition: buffercache.hpp:32
void releaseGLObjects(osg::State *state)
Definition: buffercache.cpp:246
Implements creation and caching of vertex buffers for terrain chunks.
Definition: buffercache.hpp:14
std::map< int, osg::ref_ptr< osg::Vec2Array > > mUvBufferMap
Definition: buffercache.hpp:35
osg::ref_ptr< osg::Vec2Array > getUVBuffer(unsigned int numVerts)
Definition: buffercache.cpp:181
OpenThreads::Mutex mIndexBufferMutex
Definition: buffercache.hpp:33
OpenThreads::Mutex mUvBufferMutex
Definition: buffercache.hpp:36
State
Definition: state.hpp:6
osg::ref_ptr< osg::DrawElements > getIndexBuffer(unsigned int numVerts, unsigned int flags)
Definition: buffercache.cpp:210
void clearCache()
Definition: buffercache.cpp:234