diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h index f2cca8e9bf5..e6ceb0f4929 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h @@ -85,7 +85,7 @@ class RAS_DisplayArray { public: vector m_vertex; - vector m_index; + vector m_index; enum {BUCKET_MAX_INDEX = 65535}; enum {BUCKET_MAX_VERTEX = 65535}; diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index 4bf30fa5b10..42c9fc0737e 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -55,7 +55,7 @@ struct RAS_MeshObject::polygonSlot /* pnorm is the normal from the plane equation that the distance from is * used to sort again. */ - void get(const RAS_TexVert *vertexarray, const unsigned short *indexarray, + void get(const RAS_TexVert *vertexarray, const unsigned int *indexarray, int offset, int nvert, const MT_Vector3& pnorm) { MT_Vector3 center(0.0f, 0.0f, 0.0f); @@ -72,7 +72,7 @@ struct RAS_MeshObject::polygonSlot m_z = MT_dot(pnorm, center); } - void set(unsigned short *indexarray, int offset, int nvert) + void set(unsigned int *indexarray, int offset, int nvert) { int i; diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.cpp index 15ee705f66c..506b68ca160 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.cpp @@ -100,7 +100,7 @@ void RAS_StorageVA::IndexPrimitives(RAS_MeshSlot *ms) bool wireframe = m_drawingmode <= RAS_IRasterizer::KX_WIREFRAME; RAS_DisplayArray *array = ms->GetDisplayArray(); RAS_TexVert *vertexarray = array->m_vertex.data(); - unsigned short *indexarray = array->m_index.data(); + unsigned int *indexarray = array->m_index.data(); // colors if (!wireframe) { @@ -120,7 +120,7 @@ void RAS_StorageVA::IndexPrimitives(RAS_MeshSlot *ms) glColor4f(0.0f, 0.0f, 0.0f, 1.0f); // here the actual drawing takes places - glDrawElements(GL_TRIANGLES, array->m_index.size(), GL_UNSIGNED_SHORT, indexarray); + glDrawElements(GL_TRIANGLES, array->m_index.size(), GL_UNSIGNED_INT, indexarray); } void RAS_StorageVA::TexCoordPtr(const RAS_TexVert *tv) diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.cpp index 62ec52bcc1e..34c08eeb908 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.cpp @@ -71,7 +71,7 @@ void VBO::UpdateData() void VBO::UpdateIndices() { glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, m_ibo); - glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_data->m_index.size() * sizeof(GLushort), + glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_data->m_index.size() * sizeof(GLuint), m_data->m_index.data(), GL_STATIC_DRAW); } @@ -182,7 +182,7 @@ void VBO::Unbind(int attrib_num) void VBO::Draw() { - glDrawElements(m_mode, m_indices, GL_UNSIGNED_SHORT, 0); + glDrawElements(m_mode, m_indices, GL_UNSIGNED_INT, 0); } RAS_StorageVBO::RAS_StorageVBO(int *texco_num, RAS_IRasterizer::TexCoGen *texco, int *attrib_num, RAS_IRasterizer::TexCoGen *attrib, int *attrib_layer) :