34 #ifndef MESH_VERTEXBUFFERLEAF_H
35 #define MESH_VERTEXBUFFERLEAF_H
38 #include "vertexBufferBase.h"
44 class VertexBufferLeaf :
public VertexBufferBase
47 VertexBufferLeaf( VertexBufferData& data )
48 : _globalData( data ), _vertexStart( 0 ),
49 _indexStart( 0 ), _indexLength( 0 ) {}
50 virtual ~VertexBufferLeaf() {}
52 virtual void draw( VertexBufferState& state )
const;
53 virtual Index getNumberOfVertices()
const {
return _indexLength; }
56 virtual void toStream( std::ostream& os );
57 virtual void fromMemory(
char** addr, VertexBufferData& globalData );
59 virtual void setupTree( VertexData& data,
const Index start,
60 const Index length,
const Axis axis,
62 VertexBufferData& globalData );
63 virtual const BoundingSphere& updateBoundingSphere();
64 virtual void updateRange();
67 void setupRendering( VertexBufferState& state, GLuint* data )
const;
68 void renderImmediate( VertexBufferState& state )
const;
69 void renderDisplayList( VertexBufferState& state )
const;
70 void renderBufferObject( VertexBufferState& state )
const;
72 VertexBufferData& _globalData;
73 BoundingBox _boundingBox;
77 ShortIndex _vertexLength;
85 #endif // MESH_VERTEXBUFFERLEAF_H
co::Object to distribute a model, holds a VertexBufferBase node.