View Full Version : Setting a vert's secondary color
rgreene
06-03-2002, 01:39 PM
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!
rgreene
06-03-2002, 01:51 PM
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! http://www.opengl.org/discussion_boards/ubb/smile.gif
Humus
06-03-2002, 01:57 PM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif
[This message has been edited by Humus (edited 06-03-2002).]
jra101
06-03-2002, 01:57 PM
use the GL_EXT_secondary_color extension to specify the secondary color
http://oss.sgi.com/projects/ogl-sample/registry/EXT/secondary_color.txt
rgreene
06-03-2002, 01:59 PM
Thanks guys. That's exactly what I want. Now... anybody know the answer to my second post? http://www.opengl.org/discussion_boards/ubb/smile.gif
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.