RE: [Flightgear-devel] sun angle bug fix

2003-09-18 Thread Norman Vine
Erik Hofman writes:
> Jim Wilson wrote:
> > Norman Vine <[EMAIL PROTECTED]> said:
> >
> >>>Well I'm not sure exactly what the problem is. 
>
> >>You just need to add the call to fgUpdateLocalTime()
> >>as below
> 
> > Gadds!...ok...then what currently triggers that update so that the values
> > happen to be correct by the second frame?
> 
> Both solutions didn't work for me. This might be because I'm running 
> FlightGear at 2-3 fps upon startup. It might be it actually takes quite 
> a number of frames to settle, which obviously takes longer for me.

You still need to call fgUpdateSkyAndLightingParams() at the end of
fgIdleFunction()

FYI

This is a 'chicken and egg' type situation that fgUpdateSkyAndLightingParms()
was introduced to solve years ago by just directly calling all the contributors
to the Sky Lighting.  Curt's new TOD option just added an extra wrinkle.

There shouldn't need to be any 'cach-up' required if all the contributors
are forced to update themselves.

Cheers

Norman


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] sun angle bug fix

2003-09-18 Thread Erik Hofman
Jim Wilson wrote:
Norman Vine <[EMAIL PROTECTED]> said:

Jim Wilson writes

Well I'm not sure exactly what the problem is. 
Hi Jim.

You just need to add the call to fgUpdateLocalTime()
as below

Gadds!...ok...then what currently triggers that update so that the values
happen to be correct by the second frame?
Both solutions didn't work for me. This might be because I'm running 
FlightGear at 2-3 fps upon startup. It might be it actually takes quite 
a number of frames to settle, which obviously takes longer for me.

BTW can we do something with tmp.cxx?  Either create a class for the functions
or move them to main.cxx?
// tmp.cxx -- stuff I don't know what to do with at the moment
//
// Written by Curtis Olson, started July 2000.
//
According to the comment, it is three years old now :-)
For the records, I have rewritten the fgTIME class to force it into a 
FGSubSystem jacket. I might even go crazy and make it a container class 
for fgSun and fgMoon functions.

After that I hope some stuff has settled down and is starting to behave 
in a more sane manner.

Erik

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] sun angle bug fix

2003-09-18 Thread Jim Wilson
Norman Vine <[EMAIL PROTECTED]> said:

> Jim Wilson writes
> > 
> > Well I'm not sure exactly what the problem is. 
> 
> Hi Jim.
> 
> You just need to add the call to fgUpdateLocalTime()
> as below
> 
> Cheers
> 
> Norman
> 
> // $FG_SRC / Time / tmp.cxx
> 
> // update sky and lighting parameters
> void fgUpdateSkyAndLightingParams() {
>   fgUpdateLocalTime();
> fgUpdateSunPos();
> fgUpdateMoonPos();
> cur_light_params.Update();
> }
> 

Gadds!...ok...then what currently triggers that update so that the values
happen to be correct by the second frame?

BTW can we do something with tmp.cxx?  Either create a class for the functions
or move them to main.cxx?

// tmp.cxx -- stuff I don't know what to do with at the moment
//
// Written by Curtis Olson, started July 2000.
//

According to the comment, it is three years old now :-)

Best,

Jim

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] sun angle bug fix

2003-09-17 Thread Norman Vine
Jim Wilson writes
> 
> Well I'm not sure exactly what the problem is. 

Hi Jim.

You just need to add the call to fgUpdateLocalTime()
as below

Cheers

Norman

// $FG_SRC / Time / tmp.cxx

// update sky and lighting parameters
void fgUpdateSkyAndLightingParams() {
fgUpdateLocalTime();
fgUpdateSunPos();
fgUpdateMoonPos();
cur_light_params.Update();
}


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel