Fixed Mesh:setDrawRange when the Mesh has a vertex map and the first argument to setDrawRange is non-zero. Removed mesh-specific instancing code.

This commit is contained in:
Alex Szpakowski
2014-05-30 17:52:58 -03:00
parent f973c696f9
commit 6971ece4cb
4 changed files with 26 additions and 79 deletions
+1 -11
View File
@@ -119,15 +119,6 @@ public:
**/
size_t getVertexMapCount() const;
/**
* Sets the number of instances of this Mesh to draw (uses hardware
* instancing when possible.)
* A custom vertex shader is necessary in order to introduce differences
* in each instance.
**/
void setInstanceCount(int count);
int getInstanceCount() const;
/**
* Sets the texture used when drawing the Mesh.
**/
@@ -171,6 +162,7 @@ private:
GLenum getGLDrawMode(DrawMode mode) const;
GLenum getGLDataTypeFromMax(size_t maxvalue) const;
size_t getGLDataTypeSize(GLenum datatype) const;
// Vertex buffer.
VertexBuffer *vbo;
@@ -181,8 +173,6 @@ private:
size_t element_count;
GLenum element_data_type;
int instance_count;
DrawMode draw_mode;
int range_min;