1
0
Fork 0

Patch from Jim Wilson:

Minor fixes.  Made some changes to get lighting correct for time of day
for now. MSVC compatibility fix and returned to clearing z-buffer only in
LOOKFROM (formerly pilot view).

[dpm: removed the last one, since I had already made a similar patch]
This commit is contained in:
david 2002-04-13 13:11:34 +00:00
parent d254b2a331
commit 39416c2855
2 changed files with 17 additions and 11 deletions

View file

@ -640,6 +640,8 @@ void fgInitFDM() {
// Initialize view parameters
void fgInitView() {
// force update of model so that viewer can get some data...
globals->get_aircraft_model()->update(0);
globals->get_viewmgr()->update(0);
}
@ -769,6 +771,13 @@ bool fgInitSubsystems( void ) {
fgAircraftInit(); // In the future this might not be the case.
////////////////////////////////////////////////////////////////////
// Initialize the view manager subsystem.
////////////////////////////////////////////////////////////////////
fgInitView();
////////////////////////////////////////////////////////////////////
// Initialize the event manager subsystem.
////////////////////////////////////////////////////////////////////
@ -781,13 +790,6 @@ bool fgInitSubsystems( void ) {
60000 );
////////////////////////////////////////////////////////////////////
// Initialize the view manager subsystem.
////////////////////////////////////////////////////////////////////
fgInitView();
////////////////////////////////////////////////////////////////////
// Initialize the lighting subsystem.
////////////////////////////////////////////////////////////////////
@ -805,6 +807,8 @@ bool fgInitSubsystems( void ) {
// Initialize Lighting interpolation tables
l->Init();
// force one lighting update to make it right to start with...
l->Update();
// update the lighting parameters (based on sun angle)
global_events.Register( "fgLight::Update()",
&cur_light_params, &fgLIGHT::Update,
@ -1126,3 +1130,4 @@ void fgReInitSubsystems( void )
fgSetBool("/sim/freeze/master", false);
}
}

View file

@ -108,10 +108,10 @@ public:
virtual float *get_surface_south() { return _surface_south; }
// Matrices...
virtual const sgMat4 &getTransformMatrix() { if ( _dirty ) { recalc(); } return TRANS; }
virtual const sgMat4 &getCachedTransformMatrix() { return TRANS; }
virtual const sgMat4 &getUpMatrix() { if ( _dirty ) { recalc(); } return UP; }
virtual const sgMat4 &getCachedUpMatrix() { return UP; }
virtual const sgVec4 * getTransformMatrix() { if ( _dirty ) { recalc(); } return TRANS; }
virtual const sgVec4 * getCachedTransformMatrix() { return TRANS; }
virtual const sgVec4 * getUpMatrix() { if ( _dirty ) { recalc(); } return UP; }
virtual const sgVec4 * getCachedUpMatrix() { return UP; }
private:
@ -176,3 +176,4 @@ private: