Преглед изворни кода

Fixes #267
Thanks to DavidWilliams81 for pointing this out.

Darryl Gough пре 13 година
родитељ
комит
4388f6d8f4
4 измењених фајлова са 4 додато и 4 уклоњено
  1. 1 1
      gameplay/src/Mesh.cpp
  2. 1 1
      gameplay/src/Mesh.h
  3. 1 1
      gameplay/src/MeshPart.cpp
  4. 1 1
      gameplay/src/MeshPart.h

+ 1 - 1
gameplay/src/Mesh.cpp

@@ -282,7 +282,7 @@ void Mesh::setPrimitiveType(PrimitiveType type)
     _primitiveType = type;
     _primitiveType = type;
 }
 }
 
 
-void Mesh::setVertexData(float* vertexData, unsigned int vertexStart, unsigned int vertexCount)
+void Mesh::setVertexData(const float* vertexData, unsigned int vertexStart, unsigned int vertexCount)
 {
 {
     GL_ASSERT( glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer) );
     GL_ASSERT( glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer) );
 
 

+ 1 - 1
gameplay/src/Mesh.h

@@ -197,7 +197,7 @@ public:
      * @param vertexStart The index of the starting vertex (0 by default).
      * @param vertexStart The index of the starting vertex (0 by default).
      * @param vertexCount The number of vertices to be set (default is 0, for all vertices).
      * @param vertexCount The number of vertices to be set (default is 0, for all vertices).
      */
      */
-    void setVertexData(float* vertexData, unsigned int vertexStart = 0, unsigned int vertexCount = 0);
+    void setVertexData(const float* vertexData, unsigned int vertexStart = 0, unsigned int vertexCount = 0);
 
 
     /**
     /**
      * Creates and adds a new part of primitive data defining how the vertices are connected.
      * Creates and adds a new part of primitive data defining how the vertices are connected.

+ 1 - 1
gameplay/src/MeshPart.cpp

@@ -104,7 +104,7 @@ bool MeshPart::isDynamic() const
     return _dynamic;
     return _dynamic;
 }
 }
 
 
-void MeshPart::setIndexData(void* indexData, unsigned int indexStart, unsigned int indexCount)
+void MeshPart::setIndexData(const void* indexData, unsigned int indexStart, unsigned int indexCount)
 {
 {
     GL_ASSERT( glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBuffer) );
     GL_ASSERT( glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBuffer) );
 
 

+ 1 - 1
gameplay/src/MeshPart.h

@@ -72,7 +72,7 @@ public:
      * @param indexCount The number of indices to be set.
      * @param indexCount The number of indices to be set.
      * @script{ignore}
      * @script{ignore}
      */
      */
-    void setIndexData(void* indexData, unsigned int indexStart, unsigned int indexCount);
+    void setIndexData(const void* indexData, unsigned int indexStart, unsigned int indexCount);
 
 
 private:
 private: