Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // filling normal buffer
- glBindBuffer( GL_ARRAY_BUFFER, normalBuffer );
- glBufferData( GL_ARRAY_BUFFER, currentMesh->m_NumVertices * sizeof(Cream::Math::Vector3f), currentMesh->m_Normals, GL_STATIC_DRAW );
- // drawing
- glEnableClientState( GL_NORMAL_ARRAY );
- glBindBuffer( GL_ARRAY_BUFFER, m_MeshData->m_VBOs[idx].m_Normals );
- glNormalPointer( GL_FLOAT, 0, 0 );
- cglDrawElements( GL_TRIANGLES, currentMesh.m_NumFaces * 3, GL_UNSIGNED_INT, NULL );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement