I have made some slight changes in my code and cut back to creating one array in the form of:
Originally Posted by BionicBytes
If we take an example i have 7055 faces (indices).
Each created in this form: f 716/4636/4636 717/4637/4637 710/4638/4638
Since i only need the position and norm i create an array of the size faces*6.
So if i were in the former case of using texturecoords i would be a factor 9 from the real size.
But so far i have following rendering, which is still "broken".
7055 faces does not equal 7055 indices.
Originally Posted by Graphicz
1 face = 3 verticies (to create a triangle) = 3 indicies.
This arrangement of "f x/y/z" implies that for each face your OBJ file contains vertex/normal/texturecoord.
Therefore your array sizes (assuming an interleaved array) would be #faces * (3 vertex + 3 Normal + 2 Texcoord) [glfloat]
and the number of indicies required would be #faces * 3
Tags for this Thread