Re: [info-performer] earthy sky

Date view Thread view Subject view Author view

From: faculaganymede (faculaganymede++at++yahoo.com)
Date: 06/23/2005 13:26:47


Dani,

I tried to achieve the same thing (change the colors
of the earthsky dynamically) in an application I
worked on a while back. I think what worked for me
was change the earthsky color in a pfChannel draw
callback, something like this:

...
chan->setTravFunc(PFTRAV_DRAW, DrawChannel);

// Draw process callback
static void DrawChannel (pfChannel *chan, void *)
{
    chan->clear();
    esky->setColor(PFES_SKY_TOP,1.0,1.0,1.0,1.0);
    pfDraw ();
}
...

--- Paolo Farinelli <paolo++at++sgi.com> wrote:

> Hi Dani,
>
> Try something like:
>
> module = viewer->findModule("pfvmEarthandSky");
> pfEarthSky* esky =
> ((pfvmEarthSky*)module)->getESky();
> esky->setColor(PFES_SKY_TOP,1.0,1.0,1.0,1.0);
>
> The pfvmEarthSky module only takes care of the
> initial
> configuration of the pfEarthSky object.
> After pfConfig, the application has to take over, as
> in
> the above example.
>
> Hope this helps.
> Regards,
> Paolo
>
>
> On Wed, 22 Jun 2005 21:50:41 -0700 (PDT), Daniela
> Calderon
> <danielacpucci10++at++yahoo.com> wrote:
>
> > Hi all!
> > I want to change dynamically the colors of the
> > earthsky so i'm doing
> > this:
> >
> > module = viewer->findModule("pfvmEarthandSky");
> >
> > ((pfvmEarthSky *)module)->colSkyTop.vec[0] = 1;
> >
> > ... etc for all the properties...
> >
> > but nothing happens ....
> >
> > thank in advance..
> >
> > dani
>
>
> --
> Paolo Farinelli <paolo++at++sgi.com>
> Open GL Performer - Silicon Graphics Inc.
>
>
-----------------------------------------------------------------------
> 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
>
-----------------------------------------------------------------------
>
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jun 23 2005 - 13:26:47 PDT