SetAmbientColor() in TGE 1.5
by Abelmon Bastos · in Torque Game Engine · 04/30/2007 (9:35 pm) · 2 replies
Hi,
I'm trying to use Enviro-Torque resource (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8848) in TGE 1.5. Its Celestials class calls setAmbientColor in the light manager object. This method don't exists in TGE 1.5 (it sounds like tge 1.5 have a new light manager system).
Celestial class also calls setVectorLightsEnabled and getLight(0) that also dont exists in TGE 1.5 LightManager object (see below):
Someone can help-me to convert this code to TGE 1.5?
Sorry for bad english and thank u!
I'm trying to use Enviro-Torque resource (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8848) in TGE 1.5. Its Celestials class calls setAmbientColor in the light manager object. This method don't exists in TGE 1.5 (it sounds like tge 1.5 have a new light manager system).
Celestial class also calls setVectorLightsEnabled and getLight(0) that also dont exists in TGE 1.5 LightManager object (see below):
/** Heavens::UpdateSunPosition() does just that.
It updates the position of the sun.
The fxSunLight class must be updated to
grab elevation and azimuth data from this
class object.*/
void Celestials::UpdateSunPosition()
{
...
//***************************
// Now do the lighting stuff
//***************************
GetColor(mCurrentColor);
LightManager *lm = gClientSceneGraph->getLightManager();
lm->setVectorLightsEnabled(false);
lm->setAmbientColor(mCurrentColor);
}
...
Sun* Celestials::GetSunObject()
{
return (Sun*) &(gClientSceneGraph->getLightManager()->getLight(0));
}
...Someone can help-me to convert this code to TGE 1.5?
Sorry for bad english and thank u!
#2
Thank u.
05/01/2007 (7:33 am)
I already looked for similiar functions in sgLightManager.h and .cc, but I didn't found it. TGE 1.5 have a new light manager system, very different from TGE 1.3.Thank u.
Torque Owner Ross Kabus