I have noticed that 3d Studio converts every single mesh into triangles. So a cube with 6 faces, becomes 12 faces when in 3ds format. So, when I use glBegin(GL_TRIANGLES) to display the mesh in OpenGL, I get triangles form of a cube! arrrghh
So, how can I get a proper cube, that is a cube side (basically a square and not 2 triangles?)
Is there are way to avoid this problem?
Do i have to re-edit the vertex list in the .3ds file to overcome this problem? If so, how can I keep track of how many vertices are used for a face? So, for example if a particular face uses 4 vertices, then i know I will have to start with a GLBegin(GL_QUADS) instead of GLBegin(GL_TRIANGLES)
Has anyone faced with this problem?
sprochet, I can extract the vertex list, face list etc, using my own program but the problem is, when creating the vertices from the face index and vertex list, i realised that the vertices are in triangle form. that is, one face is A, B, and C. which makes up a triangle. Currently i use (GL_TRIANGLES) to draw the mesh, it works, but displays triangles into of quads when necessary.
Now the reason why im asking how to make one quad instead of two triangles for a each side of a cube is because whenever I use texture coords for each side, i get the texture split into those 2 triangles!! If it were one, then it would be no problem, but one texture split into 2 triangles looks like crap!
3DSMax will export the texture coordinates anyway. Are you designing models in 3DS and then texturing them in code?!? Why do that? Just do the models, with textures, in 3DS, and texture coordinates will be generated as well as vertex coordinates, face normals, vertex normals, etc.