Added osg::FrameStamp::set/getSimulationTime().
Added setting of osg_SimulationTime and osg_DeltaSimulationTime to the uniforms set by SceneView Added frame(double simulationTime) and advance(double simulationTime) parameters to osgViewer::SimpleViewer, Vewer and CompositeViewer. Updated various examples and Nodes to use SimulationTime where appropriate.
This commit is contained in:
@@ -82,7 +82,7 @@ class UniformVarying : public osg::Uniform::Callback
|
||||
virtual void operator () (osg::Uniform* uniform, osg::NodeVisitor* nv)
|
||||
{
|
||||
const osg::FrameStamp* fs = nv->getFrameStamp();
|
||||
float value = sinf(fs->getReferenceTime());
|
||||
float value = sinf(fs->getSimulationTime());
|
||||
uniform->set(osg::Vec4(value,-value,-value,value));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user