I load 3DS models with Lev P’s L3DS ( http://www.levp.de/3d/3ds/ ), then i create display lists with this code:
// Generate display list for the model.
dispListModel_GLuint = glGenLists(1);
// Create a display list for the model.
glNewList(dispListModel_GLuint, GL_COMPILE);
for(uint i= 0; i < model_L3DS.GetMeshCount(); i++)
{
glVertexPointer(4, GL_FLOAT, 0, &model_L3DS.GetMesh(i).GetVertex(0));
glNormalPointer(GL_FLOAT, 0, &model_L3DS.GetMesh(i).GetNormal(0));
glColorPointer(3, GL_FLOAT, 0, &model_L3DS.GetMesh(i).GetBinormal(0));
glTexCoordPointer(2, GL_FLOAT, 0, &model_L3DS.GetMesh(i).GetUV(0));
glDrawElements(GL_TRIANGLES, model_L3DS.GetMesh(i).GetTriangleCount()*3, GL_UNSIGNED_SHORT, &model_L3DS.GetMesh(i).GetTriangle(0));
}
glColor3f(1.0, 1.0, 1.0);
glEndList();
It works very well, but i want to try out VBOs. How do i do that?