Re: [osg-users] initializing the depth buffer with another camera's buffer before rendering

2013-02-21 Thread Christian Buchner
Hmm, im am stuck trying to extract a pointer to an fbo object in the postDrawCallback of my cameras, allowing me to call fbo_ext->glBlitFramebuffer(...) My offscreen render cameras perform their own FBO setup. I am merely passing the hint to use a frame buffer object as render target by calling

Re: [osg-users] Problem with 2 RTT cameras

2013-02-21 Thread Robert Osfield
Hi Glenn, On 21 February 2013 13:58, Glenn Waldron wrote: > Thanks guys. I figured this one out. Here was the issue: > > Turns out I fibbed about not sharing data: I assigned a common stateset to > both cameras prior to configuring each one for RTT. > > osg::StateSet* common = new osg::StateS

Re: [osg-users] Problem with 2 RTT cameras

2013-02-21 Thread Glenn Waldron
Thanks guys. I figured this one out. Here was the issue: Turns out I fibbed about not sharing data: I assigned a common stateset to both cameras prior to configuring each one for RTT. osg::StateSet* common = new osg::StateSet(); ... cam1->setStateSet(common); cam2->setStateSet(com

Re: [osg-users] initializing the depth buffer with another camera's buffer before rendering

2013-02-21 Thread Mathias Fröhlich
Hi, On Thursday, February 21, 2013 14:13:19 Sebastian Messerschmidt wrote: > do you need to copy it? Or is it sufficient to re-use it in terms where > it is allowed to be modified by the second pass? > If later applies, you simply can bind the same depth buffer as input > texture to your RTT pass

Re: [osg-users] initializing the depth buffer with another camera's buffer before rendering

2013-02-21 Thread Sebastian Messerschmidt
Hello Christian, do you need to copy it? Or is it sufficient to re-use it in terms where it is allowed to be modified by the second pass? If later applies, you simply can bind the same depth buffer as input texture to your RTT pass. Hi, I've been modifying the "osgoit" code sample to allow op

[osg-users] initializing the depth buffer with another camera's buffer before rendering

2013-02-21 Thread Christian Buchner
Hi, I've been modifying the "osgoit" code sample to allow opaque objects to occlude the depth peeled layers. I found that rendering the opaque geometry into the depth buffer of each peeled layer causes a lot of overhead because of the extra culling and geometry passes each time. Instead I would

Re: [osg-users] Problem with 2 RTT cameras

2013-02-21 Thread Robert Osfield
Hi Glenn, I haven't seen problems with multiple RTT Camera's unintentionally sharing their attachments, use of multiple RTT Camera's is pretty common so I would have thought that others would have seen the same problem. The best I can suggest to step through the traversal of CullVisitor::apply(