Commit 572b486a authored by Martin Schultz's avatar Martin Schultz

made the OpenVolumeMeshBufferManager use the VBO in the

vertexDeclaration
parent cead023a
......@@ -263,21 +263,21 @@ void VolumeMeshBufferManager<VolumeMesh>::calculateVertexDeclaration()
if (mPrimitiveMode != PM_NONE) //should always be the case
{
mVertexDeclaration.addElement(GL_FLOAT, 3, ACG::VERTEX_USAGE_POSITION, reinterpret_cast<GLuint*>(currentOffset));
mVertexDeclaration.addElement(GL_FLOAT, 3, ACG::VERTEX_USAGE_POSITION, reinterpret_cast<GLuint*>(currentOffset),0, 0, mBuffer);
currentOffset += 3*sizeof(float);
}
if (mNormalMode != NM_NONE)
{
mNormalOffset = currentOffset;
mVertexDeclaration.addElement(GL_FLOAT, 3, ACG::VERTEX_USAGE_NORMAL, reinterpret_cast<GLuint*>(currentOffset));
mVertexDeclaration.addElement(GL_FLOAT, 3, ACG::VERTEX_USAGE_NORMAL, reinterpret_cast<GLuint*>(currentOffset),0, 0, mBuffer);
currentOffset += 3*sizeof(float);
}
if ((mColorMode != CM_NO_COLORS) || mShowIrregularInnerEdges || mShowIrregularOuterValence2Edges)
{
mColorOffset = currentOffset;
mVertexDeclaration.addElement(GL_UNSIGNED_BYTE, 4, ACG::VERTEX_USAGE_COLOR, reinterpret_cast<GLuint*>(currentOffset));
mVertexDeclaration.addElement(GL_UNSIGNED_BYTE, 4, ACG::VERTEX_USAGE_COLOR, reinterpret_cast<GLuint*>(currentOffset),0, 0, mBuffer);
currentOffset += 4*sizeof(char);
}
......@@ -287,7 +287,7 @@ void VolumeMeshBufferManager<VolumeMesh>::calculateVertexDeclaration()
unsigned char numOfCoords = 0;
if (mTexCoordMode == TCM_SINGLE_2D)
numOfCoords = 2;
mVertexDeclaration.addElement(GL_FLOAT, numOfCoords, ACG::VERTEX_USAGE_TEXCOORD, reinterpret_cast<GLuint*>(currentOffset));
mVertexDeclaration.addElement(GL_FLOAT, numOfCoords, ACG::VERTEX_USAGE_TEXCOORD, reinterpret_cast<GLuint*>(currentOffset),0, 0, mBuffer);
currentOffset += numOfCoords * sizeof(float);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment