Doing it for every vertex wastes performance
batch(0)
{ }
-void MeshBuilder::auto_offset()
+MeshBuilder::~MeshBuilder()
{
- offset(mesh.get_vertices().size());
+ mesh.check_buffers(Mesh::VERTEX_BUFFER);
}
-void MeshBuilder::vertex_(const Vector4 &v)
+void MeshBuilder::auto_offset()
{
- PrimitiveBuilder::vertex_(v);
- mesh.check_buffers(Mesh::VERTEX_BUFFER);
+ offset(mesh.get_vertices().size());
}
void MeshBuilder::begin_()
public:
MeshBuilder(Mesh &);
+ ~MeshBuilder();
+
void auto_offset();
private:
- virtual void vertex_(const Vector4 &);
virtual void begin_();
virtual void end_();
virtual void element_(unsigned);