Hi there
I use from the cal3D API to load the 3D models with their keyframes. this API finds the vertex data, normal data , texture coordinate data and face indices. But when i want to draw the faces with the following code, it produces a run-time error:
if( sizeof( CalIndex ) == 2 )
{
glDrawElements( GL_TRIANGLES, faceCount * 3, GL_UNSIGNED_SHORT, &meshFaces[0][0] );
}
else
{
glDrawElements( GL_TRIANGLES, faceCount * 3, GL_UNSIGNED_INT, &meshFaces[0][0] );
}
Why does glDrawElements crash my program?
-Ehsan-