Display Lists with Multiple Textures

I am creating a kind of 3ds loader. It works perfectly without using display lists, but it can get really slow when having high poly count objects. So i decided to implement display lists. This has definatly increased my perfomence many fold, but there seems to be a problem with the texturing. The displayed object will have either only one of the textures used to texture the entire object or none at all. How would you approach using multiple textures in display lists?

Another confusing note is if i want to bind a texture to a set of objects in a display list, do i need to bind the texture before or during the display list creation or doesnt it matter? Also do i have to rebind the texture when i call the display list? (Remember i am using multiple textures)

Thanks alot guys.

If you guide me to some resource on this that would also be greatly appricated.

There must be somthing wrong with your code (or driver?).
I’ve learned OpenGL from a book, where they forgot to write about glBindTexture function, so at beginning I had to use glTexImage2D every time I wanted to change to another texture. I’ve encapsulated these glTexImages into display lists and this way I had no performance loss.

Right now my approach looks like this:

  1. create textures
  2. create display lst using glBindTexture whenever I need to select a texture
  3. use display list

If you won’t be able to find error yourself, then be so kind to post some code.

Thanks alot, well the major problem i was encoutering was some bug in my code, but now its working great! Textures are beutiffull.

Thanks for the tips