PDA

View Full Version : generic modelling



Structural
12-11-2002, 12:52 AM
I've been wondering about generic modelling for a while, but I can't quite figure out how to do this. The problem is that I want to speed up things with vertex/texcoord arrays but there is one thing that I can't get around:
How do I use multiple textures in one model?


I mean, when I throw in a vertex/texcoord array I cannot define another texture between polygons, so I kinda need to change my perception on the concept of models. No?
Up untill now I've had quite extensive classes to give a model multiple textures.

To narrow down my question:
1) Is it common multiple textures are used in models?
2) Is a model usually drawn in one call to the DrawElements() ? Or are the calls split up to change state in between?

TY

satan
12-11-2002, 03:28 AM
1) if needed
2) glBindTexture(TexOne)
glDrawElements() // all tris with TexOne
glBindTexture(TexTwo)
glDrawElements() // all tris with TexTwo
etc.