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
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.
Jean-Sebastien Guay [EMAIL PROTECTED]
osg-users mailing list