Setting a vert's secondary color

Hey all, after a bit of reading I’ve figured out how register combiners work work. However, I can’t seem to find any documentation about how to set col1 directly through the OpenGL API. Right now col0 is being set by a color array, and I’d like to be able to do the same with col1.

Is glColorPointer () smart enough to seperate the floats I give it in my buffer into col0 and col1 if I set my stride to 6 * sizeof (float)?

Surely, there’s an easy way to do this without having to use a vertex program.

Thanks!

The other question that I forgot to ask is how does one properly mask off color chans in the nVIDIA texture combiner. Like, in DX I could say:

mov r0, v0.r

to replicate the red value into all 4 values in r0, but the best I can find here is to do a dot product with color masks (1, 0, 0, 0), but that will only fill the r chan, not g, b, or a.

Again, thanks!

use the GL_EXT_secondary_color extension to specify the secondary color

http://oss.sgi.com/projects/ogl-sample/registry/EXT/secondary_color.txt

Originally posted by rgreene:
However, I can’t seem to find any documentation about how to set col1 directly through the OpenGL API.

http://oss.sgi.com/projects/ogl-sample/registry/EXT/secondary_color.txt

Edit: jra101 beat me to it

[This message has been edited by Humus (edited 06-03-2002).]

Thanks guys. That’s exactly what I want. Now… anybody know the answer to my second post?