Can someone show me a quick example of multitexturing?

I just need something straight and to the point to get me started.

I use glDrawElements, and I have these functions set up and ready to use.

glMultiTexCoord2fvARB(GLenum, const GLfloat *)

check my site (url in profile)

Thanks zed!

I looked at the code, but I can’t see any way of using a multitexture with my DrawElements. Would I use a DisplayList instead if DrawElements?

there is no difference, you have to set up the combiners for the multitexture first, and then just overgive

texturecoordinates per vertex per texture stage

texturecoordinate pointer per texture stage
vertexcoordinate pointer

and then drawglelements… i dont think the use of the multitexCoordPointer should be selfexplaining, just take a look at the multitexture_arb spec…

The extension explanation has been taken down because it’s a part of 1.2.1 now. Where can I find the specs you’re talking about?

i think when you go to and then click on the right site onto the opengl specs 1.2.1 then you get it…

this one…

Whoa. I know I need to use the ClientActivateARB
now, but this specification doesn’t make sence to me.

Can I have a working example of these function in use? zeds example is understandable, but I need a faster way.

glActiveTextureARB( GL_TEXTURE0_ARB );
glBindTexture( GL_TEXTURE_2D, textureID_0 );
glClientActiveTextureARB ( GL_TEXTURE0_ARB );
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
glTexCoordPointer ( 2,GL_FLOAT,0,tex_coords);

glActiveTextureARB( GL_TEXTURE1_ARB );
glBindTexture( GL_TEXTURE_2D, textureID_1 );
glClientActiveTextureARB ( GL_TEXTURE0_ARB );
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
glTexCoordPointer ( 2,GL_FLOAT,0,tex_coords2); tex_coords2);

ps a request to whoever runs the forum, can u make this box where i type the text in a little smaller 5 half lines of text at once is a bit more than my eyes can take. cheers

Alright! Thanks. I’ll try it out tommorow after work.

I assume all I have to do after I call those functions is just draw the elements…

How do you change the multitexture ops? I have an example or two of it, but it isn’t too clear. I’d also like a link to a VB demo of multitexturing, but something tells me that it requires some form of support that only C++ can offer… :