[osg-users] Can a FrameBufferObject be shared by multiple cameras?
Julien Valentin
julienvalentin51 at gmail.com
Thu May 10 11:58:02 PDT 2018
Hi Robert and Glenn,
I struggle against this problem too for a will now..
Wouldn't it be a good design to make FBO a Camera property and RenderStage take this one if exist for its stuff?
Cheers
robertosfield wrote:
> Hi Glenn,
>
> If there is a way to share FBO's between osg::Camera I don't know of
> it off the top of my head. You'd need to look at the
> src/osgUtil/RenderStage.cpp so see how it sets up the FBO's. It's
> able to ruse it's own FBO on subsequent frames so there may be a way
> for forcing it to use an existing FBO.
>
> Robert.
>
> On 10 May 2018 at 14:02, Glenn Waldron <> wrote:
>
> > Hi Robert,
> >
> > I have a scenario that uses multiple RTT cameras. (The approach is similar
> > in concept to CSM - Cascading Shadow Maps - where you compose a texture
> > using multiple frustums). Each RTT camera renders to a different layer of a
> > Texture2DArray. This works great! However, it uses a lot more memory than I
> > was expecting.
> >
> > I realized that each osg::Camera creates its own separate FBO, resulting in
> > a lot of extra memory usage. Since the cameras render sequentially, it makes
> > sense for all the RTT cameras to just re-use a single FBO. Is there any way
> > to make that happen in OSG? Any other suggestions?
> >
> > Glenn Waldron / osgEarth
> >
> > _______________________________________________
> > osg-users mailing list
> >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> ------------------
> Post generated by Mail2Forum
------------------------
Twirling twirling twirling toward freedom
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73604#73604
More information about the osg-users
mailing list