Changed OpenGLExample to use MaterialDensityPair88 instead of MaterialDensityPair44.

Added material to shaders.
This commit is contained in:
David Williams
2014-05-24 21:09:26 +02:00
parent aace1f2e36
commit 07b9cf05fa
5 changed files with 36 additions and 12 deletions

View File

@ -91,6 +91,9 @@ public:
glEnableVertexAttribArray(1); //We're talking about shader attribute '1'
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(MeshType::VertexType), (GLvoid*)(offsetof(MeshType::VertexType, normal)));
glEnableVertexAttribArray(2); //We're talking about shader attribute '2'
glVertexAttribPointer(2, 2, GL_UNSIGNED_BYTE, GL_FALSE, sizeof(MeshType::VertexType), (GLvoid*)(offsetof(MeshType::VertexType, material)));
glBindVertexArray(0);
meshData.noOfIndices = vecIndices.size(); //Save this for the call to glDrawElements later