Hi,

I would like to use an osgViewer::Viewer which should render to a constant
aspect ratio and fill the rest of any rendering window with black in any case;
also on resizing.

For that matter, I have implemented an updateViewport() method that resizes my
Viewport centered in the correct aspect ratio and according to my current window
size. This works in general, but two questions remain:

- I have called this method both as an event handler on window resize events,
and as a ResizeCallback in my GraphicsContext. Where is the correct place to put
this? If I replace the ResizeCallback of the Context, do I have to take care of
more things than just setting the viewport correctly?

- On resize in either case, ghost images of the rendering to the former window
size remain. What do I have to do to flush anything that happened before, and
just render black in the surrounding area of my viewport? Also interesting: if I
render to texture in my application, and use the frame buffer as target, those
areas that are not overwritten by the actual rendering viewport still show the
texture that is rendered to in RTT. In all cases, what I want is just plain
black. ;)

Thanks a lot,
Alex.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to