Mutliple textures

I want to render a player model that has different textures assigned to
different body parts (not multi-texturing). Perhaps this has been dicussed
before, but I need a refresher course. There are two ways as I see
to render this:

  1. Sort the polys by their assigned texture id and render them.
  2. Leave the polys alone and bind the texture when needed.

#1 is by all means the best way, but it seems a little more work must be
done. #2 is the easiest way since I have to do no extra work whatsoever.

So, if I want to do it using #2, would performance drop horribly? Would
it matter if the 3D graphics card had 16MB of texture video memory, and
all textures were able to fit into it? Since all textures are loaded
into video memory, am I correct to think that changing the current
texture bind as many times as I want when rendering would not matter
at all?

[This message has been edited by Syslock (edited 09-18-2001).]

It is always advisable to sort your polygons by texture. You can not assume that all textures will fit in video memory, as the actual amount of free video memory may vary with different OpenGL implementations, or driver versions. Sorting opaque polygons by texture really does not necessarily add a lot of extra work.

Well, it isn’t going to improve your stripping, since glBindTexture is illegal in the middle of a glBegin/End pair. Also, glBindTexture is well known to be slow, regardless of whether the textures all fit into video memory or not. Your best bet is to have the data sent to you such that “sorting” by texture is not necessary.