[Q] dynamic changes with pfFog

New Message Reply Date view Thread view Subject view Author view

Gaertner, Michael (mgaertner++at++fasainteractive.com)
Fri, 5 Dec 1997 14:56:11 -0600


I try to create a fog which is very close at the begin of the simulation
and goes further out
as the simulation goes on.

I have this defined in the drawcallback:

void DrawCallback(pfChannel *chan, void *data)
{
  static int fogValue = 0;

  if (fogValue==0)
  {
    pfFog *fog = new pf Fog;

    fog->setRange(1.0, 2.0);

    fog->apply();
    pfEnable(PFEN_FOG);
    pfOverride(PFSTATE_FOG, | PFSTATE_ENFOG, PF_ON);
  }
  else
  {
    if(fogValue<200)
    {
      if(fogValue<199)
      {
        pfFog *fog = pfGetCurFog();

        fog->setRange(fogValue, 2.0f*fogValue);
        fog->apply();
      }
      else
      {
        pfOverride(PFSTATE_FOG | PFSTATE_ENFOG, PF_OFF);
        pfDisable(PFEN_FOG);
      }
      fogValue++;
    }
     
  }

  ...
}

with this function fog gets set once and stays at the same range
til I turn it off after 200 frames.

what do I do wrong ??? why doesnt the fog move out ?
thanx for any help !

Michael
FASA Interactive
=======================================================================
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:20 PDT

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