PDA

View Full Version : interleaved vertex arrays with multitexturing



bobby_newmark
01-19-2006, 01:26 AM
First of all, I hope I'm not asking a silly question here, as I've only got the 1.2 OpenGL guide (but what appears to be the 1.5 headers - feel free to flame me if a newer guide explains exactly what I'm asking for ;)

With glInterleavedArrays(), I want to set the format for my vertex/texture coordinates and normals. All fine, however, there apparently is no constant that allows you to specify a format with more than one texture coordinate.

Constants like GL_T2F_N3F_V3F only have one 'T2F' in them, so how do I specify format with multiple UV's? Or is there a way to tell GL that one of the array elements appears multiple times?

Cheers,

Uwe

Relic
01-19-2006, 02:32 AM
glInterleavedArrays() was a convenience idea and is not going to be extended anymore. The number of enums would increase exponentially with every new vertex attribute.
Use the gl*Pointer functions to setup your interleaved array data using the correct starting pointers and strides instead.
It's less convenient but much more flexible.