Svend Tang-Petersen (svend++at++digi.lego.com)
Wed, 25 Feb 1998 13:08:24 +0100
I was trying to redo some of my old C-based Performer 2.1 code in C++
and Performer 2.2.
What I did was to modify the fog ranges in the simulation loop to get an
effect of billowing fog.
When I try to do this now, I must be missing something somewhere. I'm
setting up a pfFog when
opening the window, and that's working fine. But modifying the
pfFog::setOffsets in the
simulation loop doesn't have an effect.
I've added a pfFog::apply before the pfDraw() in the drawCallback for
the channel, but the changes
don't have any effect.
--Main:
Shared->fog = new pfFog(); Shared->fog->setFogType( PFFOG_PIX_EXP2 ); Shared->fog->setColor( 0.8, 0.8, 0.8 ); Shared->fog->setRange( 1.0, 80.0 );
--WindowSetup routine has:
Shared->fog->apply(); pfEnable( PFEN_FOG ); pfOverride( PFSTATE_FOG | PFSTATE_ENFOG, PF_ON );
--Simulation loop:
pfSinCos( 120 * pfGetTime(), &sin, &cos ); Shared->fog->setOffsets( 0.0, 30.0 * sin );
--Channel drawcallback:
channel->clear(); Shared->fog->apply(); pfDraw();
--Svend Tang-Petersen, MSc
LEGO Silicon Graphics Kloevermarken 120 Stationsparken 25 7190 Billund 2600 Glostrup Denmark Denmark
e-mail: svend++at++digi.lego.com , svend++at++copen.sgi.com
======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:52 PDT