Hey all, i'm currently using Lib3ds to load models into my C++/OpenGL project. So far, i've been follow the model loading tutorial found here.

The tutorial gives a good example of how to draw the vertices and normals using VBO's, but so far i've been lost as how to do the same thing with materials.

Could i get an explanation/example of how to both load and draw materials of my meshes using Lib3ds and OpenGL?


1 Answer 1


Explanation: every mesh face has a material, basically you need to load each material and during rendering:

for each mesh do
   for each face do
      setup face material
      draw face

But this will be inefficient and the ideal would be to group faces by material. You can after load process the mesh and group the faces with the same material, then you can draw each face batch at once for each material.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .