From: bert's account (lberto++at++clubfed.sgi.com)
Date: 01/11/2001 10:08:49
This should not actually be necessary. It implies that the object has no
pfGeoState or that the state is not being instantiated! Are you saying
that the pfFlushState would need to be called just prior to drawing
the object in question to restore the global state! This still would
not insure that the pfGeoState is instantiated. It sounds like the
more likely scenario would be that the state was corrupted some how
or maybe a pfOverride was set and the pfFlushState clears you to
a known state!
Is this possible? Anybody have a clue?
Uwe Wössner wrote:
> Hi Marcin, Hi Keith,
>
> We do have the same problem as Keith described, and we made sure,
> that all our objects do have a complete state!
> The only solution to this problem for me was to flush the State caching
> from time to time,
> so what might help you as well is to call pfFlushState(); in a draw
> callback of
> all nodes you load via the iv-loader.
>
> Regards,
> Uwe
>
> Marcin Romaszewicz wrote:
> >
> > Hi Keith,
> >
> > In Performer, the only way objects could change color like this is if
> > they're missing a geostate and end up inheriting the state of the object
> > drawn before them. The reasons that colors change is that state sorting
> > works out differently when objects go in and out of view and different
> > objects are drawn before the geostate-less objects.
> >
> > In your email, you show sample code which creates a
> > geostate with a material for your cylinders. Are you sure that you've
> > applied this geostate to the cylinder geosets? If you have added the
> > geostates to the cylinders and you are still seeing the problem, you've
> > found a bug, in which case please contact me directly.
> >
> > -- Marcin
> >
> > On Tue, 9 Jan 2001, Keith Parkins wrote:
> >
> > > When I load in the apple.iv file with perfly, the object comes up as white
> > > instead of red. Is there a way to fix this?
> > >
> > > A further manifestation of this problem (I believe) is that when I load a
> > > number of inventor files into my world and generate some generic
> > > cylinders, the colors of the cylinders change as I change my
> > > position. When the inventor files aren't loaded, the colors behave as
> > > expected. The material and lighting for the generated cylinder is setup as
> > > follows:
> > >
> > > pfMtlColorMode(materialPtr, PFMTL_FRONT, PFMTL_CMODE_OFF);
> > > pfMtlColor(materialPtr, PFMTL_DIFFUSE,
> > > obj_colors[color][0], obj_colors[color][1],
> > > obj_colors[color][2]);
> > > pfMtlColor(materialPtr, PFMTL_SPECULAR, 0.0, 0.0, 0.0);
> > > pfMtlColor(materialPtr, PFMTL_AMBIENT, 0.0, 0.0, 0.0);
> > > pfMtlShininess(materialPtr, 10.25f);
> > > pfMtlAlpha(materialPtr, 1.0);
> > >
> > > /* create the gstate and select the proper material */
> > > gStatePtr = pfNewGState(arena);
> > > pfGStateMode(gStatePtr, PFSTATE_ENLIGHTING, PF_ON);
> > > pfGStateMode(gStatePtr, PFSTATE_TRANSPARENCY, PFTR_ON);
> > > pfGStateAttr(gStatePtr, PFSTATE_FRONTMTL, materialPtr);
> > >
> > > Has anyone had a similar problem? Any ideas as to how to fix this?
> > >
> > > Thanks!
> > > Keith
> > >
> > > -----------------------------------------------------------------------
> > > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > > Open Development Project: http://oss.sgi.com/projects/performer/
> > > Submissions: info-performer++at++sgi.com
> > > Admin. requests: info-performer-request++at++sgi.com
> > >
> >
> > -----------------------------------------------------------------------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Open Development Project: http://oss.sgi.com/projects/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
>
> --
> \\\|/// *Rechenzentrum Universitaet Stuttgart*
> _I_ ( o o ) *Visualisierung* _I_
> (_++at++_)----oo0O--(_)--O0oo----------------------------------------(_++at++_)
> | | Uwe Woessner woessner++at++rus.uni-stuttgart.de | |
> | | .ooo0 http://www.hlrs.de/people/woessner/ | |
> |_| ( ) Oooo. Phone: +49-711-685-5790 |_|
> (_++at++_)---------\ (---( )---------------------------------------(_++at++_)
> I \_) ) / I
> (_/
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
-- See Ya,Lawrence Eugene Bertoldi Technical Consultant vnet 238-8949 Silicon Graphics phone 301-572-8949 Silver Spring MD. email lberto++at++clubfed.sgi.com
~;-}>
This archive was generated by hypermail 2b29 : Thu Jan 11 2001 - 10:09:02 PST