mixed up vertexes and triangles .. would have been a hard to find error...

This commit is contained in:
Nicole Dresselhaus 2014-08-24 22:50:49 +02:00
parent dc2205d3dc
commit b4710797fc
No known key found for this signature in database
GPG Key ID: BC16D887851A1A80

View File

@ -241,7 +241,7 @@ parseIQM a =
checkError "bufferData vao" checkError "bufferData vao"
-- tell layout -- tell layout
vertexAttribPointer l $= (ToFloat, VertexArrayDescriptor num Float 0 nullPtr) vertexAttribPointer l $= (ToFloat, VertexArrayDescriptor num Float 0 nullPtr)
let len = (fromIntegral.num_triangles.bareheader) bare let len = (fromIntegral.num_vertexes.bareheader) bare
initBuffer (AttribLocation 0) IQMPosition va' len initBuffer (AttribLocation 0) IQMPosition va' len
initBuffer (AttribLocation 1) IQMNormal va' len initBuffer (AttribLocation 1) IQMNormal va' len
initBuffer (AttribLocation 2) IQMTexCoord va' len initBuffer (AttribLocation 2) IQMTexCoord va' len