Now supporting multiple material per mesh. Simon changed glDrawElementsBaseVertex to glDrawElements in DrawFinalPass.cpp Hallelulijah!

This commit is contained in:
antc13
2016-01-19 17:40:34 +01:00
parent 2a3009212a
commit 3826142e94
15 changed files with 359 additions and 230 deletions
+1 -3
View File
@@ -56,9 +56,7 @@ void DrawFinalPass::Draw(RenderScene& scene)
glBindVertexArray(modelJob->Model->VAO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer);
glDrawElementsBaseVertex(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, 0, modelJob->StartIndex);
continue;
glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex * sizeof(unsigned int)));
}
}
GLERROR("DrawFinalPass::Draw: END");