View Full Version : Multitexture and Interleaved arrays

04-16-2002, 05:23 AM
How can I implement interleaved arrays with multitexture? Does any constant exist to make mulitexture, I mean enything like T2F_T2F_C4F_N3F_V3F ?

04-16-2002, 05:57 AM
Nope, no interleaved format for multitexturing.

Shouldn't be much problem for you though, since any interleaved format can be set with regular calls to glVertexPointer/glTexCoordPointer, and so on.

04-16-2002, 07:57 PM
Interleaved arrays is basically just syntactic sugar. I personally find it more straightforward (and certainly more flexible) to specify the arrays separately. Note that, because you can specify the stride, you can still keep all data interleaved, even with separate VertexPointer()/NormalPointer()/TexCoordPointer() calls.

04-17-2002, 12:28 AM
Then , how can I implement multitextures whith vertex arrays? Enabling ARB 0, specifying the first TexCoordPointer(), enabling ARB 1 and specifying second TexCoordPointer()?

04-17-2002, 12:42 AM
Yes, you're bang on....
but use "glClientActiveTextureARB" instead of 'glActiveTextureARB' to set the current texture unit before specifying the pointer to its texture coordinates with glTexCoordPointer.