PDA

View Full Version : multitexturing with vertex arrays



sbennett
01-23-2002, 04:53 AM
Is there a way of specifying two sets of texture coordinates(for multitexturing) in vertex arrays? Also, is there a glInterleavedArrays() format that can acheive this?

The nVidia SDK has whitepapers that talk about two sets of tex coords per vertex in an array, which implies it's possible.

Bob
01-23-2002, 05:02 AM
Set the first texture coordinate array as usual. This will be assigned to the first texture unit. Second, activate the second texture unit with glClientActiveTexture, and assing another array of texture coordinates(or the same if you like http://www.opengl.org/discussion_boards/ubb/biggrin.gif ).




GLtype *array0;
GLtype *array1;
glClientActiveTexture(GL_TEXTURE0);
glTexCoordPointer(..., array0);
glClientActiveTexture(GL_TEXTURE1);
glTexCoordPointer(..., array1);


And no, there's no special interleaved format for multitexturing.

sbennett
01-25-2002, 04:34 AM
Thanks.