multitexuring and vertex arrays

Hi…I’m fairly new to OpenGL so I have some questions…

I currently use vertex arrays when multitexuring. But since I couldn’t find any predefined format for interleaved arrays (using 2 sets of texCoords) I had to “define an own format” using using 10 floats (T2F_T2F_N3F_V3F) and defining the strides etc separately…
I wonder if this is a good way to do? Or should I approach it in a completely different way?

Anyway, In addition I would really appriciate if I could get “pointers” to litterature/sites about OpenGL multitexturing since I found it very hard to come by on the net…

The multitexture extension defines
glClientActiveTextureARB
in order to especify different arrays (see section F.2.5, OpenGL 1.2.1 spec).

I didn’t find anything about interleaved arrays in the multitexture extension spec ther, but at least you can still use arrays sepecifing them separately with glClientActiveTextureARB to use multiple texcoords. Download the OpenGL 1.2.1 spec, where the multitexture extension is defined.

The thing is It works as I’ve implemented it but I was just wondering if it was “the right thing to do” thx anyway. I’ll check that specification.

Just make sure these are tightly packed arrays. Using the MSVC++ compiler you can make sure it doesn’t pad using the following pre-processor defines:

#pragma pack (push)
#pragma pack (1)
// Insert structures here
#pragma pack (pop)

dave

[i]

Just make sure these are tightly packed arrays. Using the MSVC++ compiler you can make sure it doesn’t pad using the following pre-processor defines:

[/i]

->
Packing problems? Whith 10 floats???
Relax…