PDA

View Full Version : Multitexturing and vbo



alucard
01-20-2004, 01:56 PM
Im writing a simple 3d model, and loading the vertex with vbo.

I want to use multitexturing in my models,
I have used it with glMultiTexCoord2fARB before.

But now with all my vertex data in a vbo I think I need to use glTexCoordPointer.
But I can only load one texture with glTexCoordPointer.

Can anybody help?

jra101
01-20-2004, 02:04 PM
Like this:



glClientActiveTexture(GL_TEXTURE0);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(...);

glClientActiveTexture(GL_TEXTURE1);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(...);

glClientActiveTexture(GL_TEXTURE2);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(...);

glClientActiveTexture(GL_TEXTURE0);

alucard
01-20-2004, 04:50 PM
Thanks!!! http://www.opengl.org/discussion_boards/ubb/smile.gif