[osg-users] Resizing FBO camera while rendering

Robert Osfield robert.osfield at gmail.com
Tue Oct 2 11:40:20 PDT 2018

Hi Rômulo,

On Tue, 2 Oct 2018 at 18:45, Rômulo Cerqueira
<romulogcerqueira at gmail.com> wrote:
> I use the method setupViewer() "to resize" the FBO as well (by instantiating the viewer, camera, texture and callback again). This approach was the best way so far to minimize this problem.

What I was trying to work out is whether calling setupViewer() was
just done because of the FBO resize of whether it was being done for
other reasons as well.

As a general approach I'd recommend sticking with a single
GraphicsWindow where possible and just handling the resize of the FBO,
or at least the mapping of the resize in other ways.  For instance one
approach you could take is to create a FBO in the maximum window size
then just use a viewport to select which part is active.  Another
approach is to force a rebuild of the FBO by clearing the
RenderingCache via camera->setRenderingCache(0).


More information about the osg-users mailing list