13 osg::ref_ptr<osg::Camera> camera;
17 void updateViewport(osg::Uniform* un)
const;
19 void updateFarPlane(osg::Uniform* un)
const;
21 void updateCameraPos(osg::Uniform* un)
const;
23 void updateViewMatrix(osg::Uniform* un)
const;
24 void updateViewMatrixInverse(osg::Uniform* un)
const;
29 : osg::Uniform::Callback(), camera(_camera){
33 virtual void operator() ( osg::Uniform* un, osg::NodeVisitor* nv )
35 const std::string& uniformName = un->getName();
37 if ( uniformName ==
"viewport" ) {
40 else if ( uniformName ==
"farPlaneVertices" ) {
43 else if ( uniformName ==
"cameraPos" ) {
46 else if ( uniformName ==
"viewMatrix" ) {
49 else if ( uniformName ==
"viewMatrixInverse" ) {
50 updateViewMatrixInverse(un);