forked from speed-dreams/speed-dreams-code
update SDRender (prepare refresh)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5438 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 6d37666afb573ad43997cb2c8c4358d81d8e06e3 Former-commit-id: 2a58dcb887734a3a18536e9a9227db437bb5d53b
This commit is contained in:
parent
395b71edbe
commit
eb27bbb2e0
2 changed files with 3 additions and 8 deletions
|
@ -448,7 +448,7 @@ void SDRender::UpdateFogColor(double sol_angle)
|
|||
sd_gamma_correct_rgb( BaseFogColor._v );
|
||||
}
|
||||
|
||||
void SDRender::Update(double currentTime, double accelTime)
|
||||
void SDRender::UpdateSky(double currentTime, double accelTime)
|
||||
{
|
||||
// Detect first call (in order to initialize "last times").
|
||||
static bool bInitialized = false;
|
||||
|
@ -505,10 +505,8 @@ void SDRender::Update(double currentTime, double accelTime)
|
|||
|
||||
// Check if time to update low speed objects : sun and moon (once every minute).
|
||||
int nextTimeLowSpeed = 60 * (int)floor((accelTime + 60.0) / 60.0);
|
||||
/*if (nextTimeLowSpeed == lastTimeLowSpeed)
|
||||
return;*/
|
||||
|
||||
const float deltaTimeLowSpeed = (float)(nextTimeLowSpeed - lastTimeLowSpeed);
|
||||
//lastTimeLowSpeed = nextTimeLowSpeed;
|
||||
|
||||
// Update sun and moon, and thus global lighting / coloring parameters of the scene.
|
||||
//GfLogDebug("%f : Updating slow objects of the dynamic sky dome (sun and moon)\n", currentTime);
|
||||
|
@ -532,7 +530,5 @@ void SDRender::Update(double currentTime, double accelTime)
|
|||
}
|
||||
|
||||
// 3) Update scene color and light
|
||||
|
||||
UpdateLight();
|
||||
|
||||
}//grUpdateSky
|
||||
|
|
|
@ -35,7 +35,6 @@ private:
|
|||
osg::ref_ptr<osg::Group> m_scene;
|
||||
osg::ref_ptr<osg::Group> m_CarRoot;
|
||||
|
||||
|
||||
osg::Vec3f BaseSkyColor;
|
||||
osg::Vec3f BaseFogColor;
|
||||
osg::Vec3f SkyColor;
|
||||
|
@ -74,7 +73,7 @@ public:
|
|||
void UpdateLight(void);
|
||||
void addCars(osg::Node* cars);
|
||||
void UpdateFogColor(double angle);
|
||||
void Update(double currentTime, double accelTime);
|
||||
void UpdateSky(double currentTime, double accelTime);
|
||||
|
||||
SDSky * getSky();
|
||||
osg::Node* getRoot() { return m_RealRoot.get(); }
|
||||
|
|
Loading…
Reference in a new issue