i have currently finished making a 3ds loders class for a game engine i’m making but i am having rendring problems:
firstly is looks like the mesh i load is missing polygons only black pachs replace it even with texture mapping there. I have assigned a normal per vertex could that add to this problem.
and, another problem i have is that i have to scale down the vertice data all the time so i just divdie by a hundred and that works, is there another way apart from glScale();
Avoid using glScale if there are other ways to deal
with that issue – like a post-loading -pre-use scaling.
Winding is most likely the problem, glDisable face
culling is good way to quickly test if that is the
problem.
A final thought; do not leave anything to luck! For
example, I like to use culling so I make sure that
all my triangles are winding the “right” way (I like
it counterclockwise). So, every time I load an object
I check the normal vector of each triangle (which
you can generate with a cross product of the vectors
formed by the nodes’ coordinates) against the per
vertex normals. If the result informs me that the
triangle winds in the wrong direction, I interchange
the order of two of the nodes. Simple.