Re: Performer 2.2 fog

New Message Reply Date view Thread view Subject view Author view

Sharon Clay (src++at++rose.engr.sgi.com)
Wed, 25 Feb 1998 10:15:03 -0800


+>---- On Feb 25, 1:08pm, Svend Tang-Petersen wrote:
> Subject: Performer 2.2 fog
->
->Hi pfAll.
->
->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();

Sorry, even though this is the fog with which you have overriden,
the PFSTATE_FOG override prevents _any_ changes to the fog so your fog
change will not be applied.

-> pfDraw();
->
->--
->

src.

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay - Silicon Graphics, Advanced Systems Dev.
src++at++sgi.com  (650) 933 - 1002  FAX: (650) 965 - 2658  MS 8U-590
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:53 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.