From: Marcin Romaszewicz (marcin++at++asmodean.engr.sgi.com)
Date: 12/13/2001 14:38:44
Actually, this should work. What will happen is that his app will have one
pfFog instance per draw, which is fine since it looks like only draw ever
touches this. I'm not sure exactly why this isn't working. Does the fog
work if you put it into a pfGeoState? Try applying fog before enabling
it; the state management deals completely differently with these two
cases. It's also quite possible that the fog override is set when you try
to apply and enable yours, so add
pfOverride(PFSTATE_FOG | PFSTATE_ENFOG,PF_OFF) before you apply it.
-- Marcin
On Thu, 13 Dec 2001, Tomlinson, Gordon wrote:
> Hi
>
> Try creating your fog in the App process and pass a pointer to that fog into the draw call back.
>
> I don't think you can create a fog instance in the draw process, you probably go away with this on the O2 as you would be running single
> process APPCULLDRAW while on the Onyx you will be running multi process APP_CULL_DRAW
>
>
> Gordon
>
> -----Original Message-----
> From: lai++at++daimi.au.dk
> To: info-performer++at++sgi.com
> Sent: 12/13/2001 8:13 AM
> Subject: multipipe fog
>
> I have some trouble getting my fog to run.
> On a single pipe linux machine, and on O2s it works like a charm. But on
> our
> three-pipe ONYX2 it doesn't work. The program runs, but the fog is
> nowhere to be
> found. I've put the fog in a draw callback, to ensure shared memory
> access.
> Any help would be acppreciated. My fog code can be found in the bottom
> of this mail:
>
> /Gorm
>
> BTW. Thanks for the help with pfTexture::subLoadImage in a previous
> post.
>
>
> int pfFogPreDraw(pfTraverser *node,void *data)
> {
> static pfFog * fog = NULL;
>
> if (fog==NULL)
> {
> fog = new pfFog;
> fog->setFogType(PFFOG_VTX_LIN);
> fog->setRange(1,8);
> fog->setColor(0.0f,0.35f,0.5f);
> }
>
> pfEnable(PFEN_FOG);
> fog->apply();
> pfOverride(PFSTATE_FOG | PFSTATE_ENFOG,PF_ON);
>
> return PFTRAV_CONT;
> }
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: 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, Info, FAQ: 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
> -----------------------------------------------------------------------
>
This archive was generated by hypermail 2b29 : Thu Dec 13 2001 - 14:38:46 PST