- Update OsgGraph
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6157 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: a0ddf2f1a9e04143819b08d60cf850937946139d Former-commit-id: 00a505d594acb41cff718fb117755090580dca46
This commit is contained in:
parent
a491e30aab
commit
401cd02e1c
4 changed files with 9 additions and 7 deletions
|
@ -868,7 +868,7 @@ void SDCar::updateCar()
|
|||
}*/
|
||||
}
|
||||
|
||||
void SDCar::updateShadingParameters2(osg::Matrixf modelview)
|
||||
void SDCar::updateShadingParameters(osg::Matrixf modelview)
|
||||
{
|
||||
shader->update(modelview);
|
||||
}
|
||||
|
@ -968,7 +968,7 @@ void SDCars::updateShadingParameters(osg::Matrixf modelview)
|
|||
|
||||
for(it = the_cars.begin(); it!= the_cars.end(); it++)
|
||||
{
|
||||
(*it)->updateShadingParameters2(modelview);
|
||||
(*it)->updateShadingParameters(modelview);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public :
|
|||
|
||||
void activateCar(tCarElt *car);
|
||||
void updateCar();
|
||||
void updateShadingParameters2(osg::Matrixf modelview);
|
||||
void updateShadingParameters(osg::Matrixf modelview);
|
||||
};
|
||||
|
||||
class SDCars
|
||||
|
|
|
@ -124,13 +124,15 @@ SDReflectionMapping::SDReflectionMapping(SDCar *c):
|
|||
camera->attach( osg::Camera::COLOR_BUFFER, reflectionMap, 0, i );
|
||||
camera->setReferenceFrame( osg::Camera::ABSOLUTE_RF );
|
||||
camera->addChild( m_sceneroot );
|
||||
camera->setProjectionMatrixAsPerspective(90.0, 1.0, 1.0, 100000.0);
|
||||
camera->setProjectionMatrixAsPerspective(90.0, 1.0, 1.0, 80000.0);
|
||||
|
||||
if (reflectionShader > 1)
|
||||
camera->setNodeMask(0);
|
||||
|
||||
camerasRoot->addChild(camera);
|
||||
cameras.push_back(camera);
|
||||
|
||||
if (reflectionShader > 1)
|
||||
camera->setNodeMask(0);
|
||||
|
||||
}
|
||||
|
||||
//ACTIVATE to enable Environment MApping <= temporary hack.
|
||||
|
|
|
@ -117,7 +117,7 @@ void SDScreens::Init(int x,int y, int width, int height, osg::ref_ptr<osg::Node>
|
|||
root = new osg::Group;
|
||||
viewer->setSceneData(root.get());
|
||||
mirrorScene = new osg::Group;
|
||||
#if 0
|
||||
#if 1
|
||||
prerenderRoot = new osg::Group;
|
||||
root->addChild(prerenderRoot);
|
||||
//root->addChild(reflectionMapping->getCamerasRoot());
|
||||
|
|
Loading…
Reference in a new issue