Hi David,

I have just reviewed the CullVsiitor::apply(Camera&) code in SVN and
it doesn't push/pop the viewport, but I can see that it probably
should for consistency sake.  I have just checked in this addition to
SVN.  You'll be able to grab the modified file SVN or look at the
changes and apply them to your local CullVisitor.cpp.

Robert.

On 2/16/07, David Spilling <[EMAIL PROTECTED]> wrote:
Dear All,

I am "moving" a scenegraph underneath a CameraNode/RTT, so that I can
perform shader related effects on it. Previously (pre RTT) I had a
cullCallback set within which the viewport size was picked up with :

    osg::CullStack* cs = dynamic_cast<osg::CullStack*>(nv);
//nv is the osg::NodeVisitor entry
    int width = cs->getViewport()->width();

This used to work fine, giving me the correct window size.

Under a RTTing/FBO/CameraNode, I was hoping that this would report the
viewport size of the CameraNode; however it still reports the size of the
actual parent window.

Is this expected behaviour? If it is, (how) can I programmatically find out
the viewport size from within a RTTing subgraph?

Thanks in advance,

David

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to