Angus Dorbie (dorbie++at++sgi.com)
Tue, 09 Feb 1999 11:37:42 -0800
You could get the particular nodes representing the various LOD's and
modify the geoset color attributes or if you are using lighting (the
glColor call would then depend on the glColorMaterial mode) you could
either change the material in the geostate which you might need to copy
or you could again use color attributes and use glColorMaterial
(performer equivalent is pfMaterial::setColorMode) to ensure that the
attributes modified the suitable property of the glMaterial. There's no
token to ignore colors in OpenGL unlike IrisGL so you can't set color
then ignore the geoset attributes through a callback.
If you have lighting enabled then you could set the material and
override it in a drwa callback on the LOD nodes. You could still do this
with emissive material properties and enable lighting.
It's difficult to narrow this down without knowing more about your
rendering state info.
Cheers,Angus.
tmartin++at++metricsys.com wrote:
>
> We our doing a port of our application from OpenGVS to Performer. We need
> to import MultiGen models of aircraft in our Performer application. The
> users like to color code these models dynamically. That is the users choose
> the color of the aircraft from the application code. The aircraft models
> have 3 LODs the highest level having texture, the 2 lower levels are
> untextured models. The untextured models need to change color the textured
> models should not. In the current OpenGVS application we put the comment
> #ignore_color in the LOD bead, (LOD attribute dialog box under comments or
> attribute extensions) in MultiGen and use a glColor call in a draw callback
> on the model in OpenGVS to change the color to what the user has selected.
> In Performer, when I use a glColor call in a draw callback on that
> aircraft model the color will not change. So I was wondering if you know
> the appropriate way to change the color of the aircraft dynamically?
> Any help you can provide is greatly appreciated.
> Thanks.
> Tammy C. Martin
> tmartin++at++metricsys.com
> Metric Systems Corporation
> 749 N.W. Beal Parkway
> Fort Walton Beach, Florida 32547-3076
> 850-302-3785
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
-- "Only the mediocre are always at their best." -- Jean GiraudouxFor advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/
This archive was generated by hypermail 2.0b2 on Tue Feb 09 1999 - 11:37:47 PST