PDA

View Full Version : Multi Texturing and interleaved arrays?



dabeav
05-23-2002, 09:22 AM
Is it possible to multitexture an interleaved vertex array? and if so, how would one go about doing this? If not, is it possible to multi texture an indexed vertex array?

mproso
05-23-2002, 09:34 AM
You have to set texture coord pointer for every active texture unit, like this
glClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(size,type,stride,data);
glClientActiveTextureARB(GL_TEXTURE1_ARB);
glTexCoordPointer(size,type,stride,data);
Hope this helps.

[This message has been edited by mproso (edited 05-23-2002).]

dabeav
05-23-2002, 09:43 AM
ok so, could i create an interleaved array, using one set of the tex coords, and then create a new texcord set, and use that as my second set? some thing like this??

glEnableClientState(GL_TEXTURE_COORD_ARRAY);

glClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(whatever);

glClientActiveTextureARB(GL_TEXTURE1_ARB);
glInterleavedArryas(GL_T2F_N3F_V3F, whatever)

glDrawElements(GL_TRIANGLES, whatever);

?? is this possible to do?

bakery2k
05-23-2002, 01:29 PM
No, you cant do that. You must specify individual arrays as in the given example.