Original Post
I decided to use L3DS to load 3ds models. The loading code works fine. I checked that with the rendering code provided as an example with the library. But there are a few things I don't undertand. I'll provide the source for the library: l3ds.h l3ds.cpp And the drawing code: L3ds load the information about material properties, texture maps... The question is... how do I stick that into the rendering function? Where do I bind the textures, apply materials and so on?
glTranslatef(0, 0, distance);
glRotatef(-90, 1.0, 0.0, 0.0);
for (uint i= 0; i<scene.GetMeshCount(); i++)
{
LMesh &mesh = scene.GetMesh(i);
glVertexPointer(4, GL_FLOAT, 0, &mesh.GetVertex(0));
glNormalPointer(GL_FLOAT, 0, &mesh.GetNormal(0));
glColorPointer(3, GL_FLOAT, 0, &mesh.GetBinormal(0));
glDrawElements(GL_TRIANGLES, mesh.GetTriangleCount()*3,
GL_UNSIGNED_SHORT, &mesh.GetTriangle(0));
}