View Full Version : Multitexture and Interleaved arrays
04-16-2002, 04: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 ?
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, 06: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-16-2002, 11:28 PM
Then , how can I implement multitextures whith vertex arrays? Enabling ARB 0, specifying the first TexCoordPointer(), enabling ARB 1 and specifying second TexCoordPointer()?
04-16-2002, 11:42 PM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.