Hi Jeremy,

I just noticed something: osgpangoanimation is the only example in osgCairo and osgPango that sets a fixed window size/position. Why is that?

As far as getting the OSG viewer
resolution is concerned, I'm probably more prone to just fixing the bug
outright rather than working around it. To be honest, I don't really
even know of any way to get this data--it's abstracted somewhere deep in
OSG. If you know of an example bit of code that does it, please let me
know.

The width and height are in the traits for a graphics context. To get them, the viewer needs to be realized. You can call viewer.realize() early, and do the scene setup afterwards, I don't see a problem with that.

You will of course need some special cases if there are two graphics contexts (for example, one view spanning across two or more video cards) but that should be pretty easy, as osgViewer::View::setUpViewAcrossAllScreens() just assumes a horizontal span layout. In all other cases, it will be a single context and the width and height will be in the traits.

Check out those methods (osgViewer::View::setUpViewAcrossAllScreens(), setUpViewInWindow() and setUpViewOnSingleScreen()) - it's pretty easy to figure out what's going on. And see osgViewer::Viewer::realize() to see how it chooses which one to call.

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to