PDA

View Full Version : glDrawElements with multitexturing



celic
10-16-2002, 06:21 AM
does it exist a function which support
glDrawElements() with more than one texture???

I need to render a textured object with environment mapping, but I have only one
glTexCoordPointer()...???

help me please

knackered
10-16-2002, 06:31 AM
To set the texture coordinates for texture unit 1, do this:-

glClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(....)
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
....


...and so on for all the other texture units.

kon
10-16-2002, 06:42 AM
And
glActiveTextureARB(...)
glEnable(...)
glBindTexture(...)
for each texture unit.
And set the desired TexEnv() for each unit!

kon


[This message has been edited by kon (edited 10-16-2002).]

[This message has been edited by kon (edited 10-16-2002).]