auto tex coordinate generation and vertex arrays?

Hi,

can I put polygons wich texture coordinate generated automatically in vertex arrays?

Saski

Just use two arrays: one with each vertex coordinates and the other one with the normals coordinates.
Then if you use TexGen (or a Vertex Program) that will generate the texture coord for you, it should work. (I actually do it that way in one of my app)

If you still specify texture coordinates via the vertex arrays but enable TexGen, those will be ignored and the ones automaticly generated will be used.

PS: I said upper you were needing one array for the normals but it’s not always necessary: it depends whether you will use them for lighting or whether TexGen needs them (eg: for Sphere mapping)

Ok, thx for the info.

Im planning to use it for Sphere mapping by the way.

But also be aware that some OpenGL implementations may not do what you expect them to do. I did something very similar, though I was using multitexture. I had one texture coordinate array enabled for one texture and auto tex-gen for another. I had reports of certain S3 Savage drivers crashing, and just bizarre behavior from some 3dfx drivers in this instance.

Lets see see how my Linux NVidia driver works out…

Saski