Problem with Lighting Resource
by Jason Gossiaux · in Torque Game Engine · 10/21/2007 (11:15 pm) · 1 replies
Howdy all,
I was attempting to modify my object selection by changing the bounding box example into the colorblend highlight example found here
Now, I followed the instructions and added the TGE 1.5 Resource kit found here I made all the code modifications indicated in the shapeBase.cc file, then I did a full rebuild without errors.
I can see the code getting to the correct spot in the debugger where the blending is being set. I can even see it hitting this code:
with the correct RGB values being set (to 5.0 in my case). However nothing changes in the engine. Any help would be appreciated. I saw some others were having trouble in TGE 1.5.2 but I have no idea if they ever got it working. Thanks!
I was attempting to modify my object selection by changing the bounding box example into the colorblend highlight example found here
Now, I followed the instructions and added the TGE 1.5 Resource kit found here I made all the code modifications indicated in the shapeBase.cc file, then I did a full rebuild without errors.
I can see the code getting to the correct spot in the debugger where the blending is being set. I can even see it hitting this code:
void sgLightingModelGLBase::sgSetState(LightInfo *light)
{
sgLightingModel::sgSetState(light);
sgConstantAttenuation = 0;
sgLinearAttenuation = 0;
sgQuadraticAttenuation = 0;
sgLightParamDiffuse = Point4F(light->mColor.red * LightManager::sgGlobalBlendColor.red,
light->mColor.green * LightManager::sgGlobalBlendColor.green,
light->mColor.blue * LightManager::sgGlobalBlendColor.blue,
1.0f * LightManager::sgGlobalBlendColor.alpha);
sgLightParamAmbient = Point4F(light->mAmbient.red * LightManager::sgGlobalBlendColor.red,
light->mAmbient.green * LightManager::sgGlobalBlendColor.green,
light->mAmbient.blue * LightManager::sgGlobalBlendColor.blue,
1.0f * LightManager::sgGlobalBlendColor.alpha);
sgLightParamPosition = Point4F(light->mPos.x, light->mPos.y, light->mPos.z, 1.0f);
sgLightParamDirection = Point4F(-light->mDirection.x, -light->mDirection.y, -light->mDirection.z, 0.0f);
}with the correct RGB values being set (to 5.0 in my case). However nothing changes in the engine. Any help would be appreciated. I saw some others were having trouble in TGE 1.5.2 but I have no idea if they ever got it working. Thanks!
About the author
Torque Owner John Kabus (BobTheCBuilder)