[Plib-devel] ssg color question
Brought to you by:
sjbaker
From: Curtis L. O. <cu...@me...> - 2000-03-02 17:57:23
|
Steve, I have a color question for you. I seem to get the expected results (correct colors) when I create a state with: enable( GL_COLOR_MATERIAL ) setColourMaterial( GL_AMBIENT_AND_DIFFUSE ) And then I feed in my desired color array when I create the VtxTable. Now, I have a multi-VtxTable object (a sphere where each slice is a separate triangle strip.) I would like to be able to control the color of this object by just modifying the associated state. My first attempt was to pass in a NULL color array when I create the VtxTables. My state was set up with: disable( GL_COLOR_MATERIAL ); setMaterial( GL_AMBIENT_AND_DIFFUSE, 1.0, 1.0, 1.0, 1.0 ); However, if I later go and update the Material color in the state, the rendered object color doesn't change. I know we already did the rounds on this with David Megginson (but I wasn't paying attention at the time ... <slap, slap>) Should my approach work, or am I missing something obvious? From a brief look at the code, I wonder if ssg is overriding the state's color for objects that have no color list defined? Any thoughts ... or should I just avoid setting global material colors and stick with enable(GL_COLOR_MATERIAL) and modify the color array? Thanks, Curt. -- Curtis Olson University of MN, ME Dept. Flight Gear Project Twin Cities cu...@me... cu...@fl... Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org |