Sign in to follow this  

MultiTexturing using VA/VBO

This topic is 4163 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone , i want to make multitexturing for object that i used VA for saving/drawing it can anyone tell me how can i make it for 2 texture or more ^^? thank you . cya,

Share this post


Link to post
Share on other sites
Quote:
Original post by ff8
Hello everyone ,
i want to make multitexturing for object that i used VA for saving/drawing it
can anyone tell me how can i make it for 2 texture or more ^^?
thank you .
cya,
You have to do the same thing you do when multitexturing in immediate mode; pass in more than one texture coordinate for each vertex. To do that you just pass a texture coord array with glTexCoordPointer for each client texture unit. And remember to enable the texture coord array for each one. You will of course have to do more such as binding/enabling a texture on each texture unit, but here's basically what you need for passing the texture coordinates...
glClientActiveTexture(GL_TEXTURE1);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, tex1coords);

glClientActiveTexture(GL_TEXTURE0);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(2, GL_FLOAT, tex0coords);
Also rememer to disable the texture coord arrays for each texture unit when you don't need it.

Share this post


Link to post
Share on other sites

This topic is 4163 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this