[osg-submissions] Move MRT into FBO patch

Art Tevs stud_info2 at yahoo.de
Tue Apr 15 13:29:56 PDT 2008


Hi Robert, J.P,

the changes seems to be ok. The thing with the
threading problem, I didn't thought about that. Thanks
for the corrections.

All my applications seems to work fine, without any
issues, as far as I could seen that for now.

Here are just some thoughts on possible drawbacks:

1) I do not know if the draw buffer implementation
could also be a non color buffer, i.e. depth or
stencil buffer. If yes, then there should be some
changes made in the setAttachment method, which do
also add non color buffers targets to the _drawBuffers
array. However this could be added in later version,
if somebody need this.

2) I still wonder if one should add something like:
glDrawBuffer(default_buffer) in the
FrameBufferObject::apply method just right after the
line 610:
ext->glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

which will restore the default draw buffer if user
ment to have this. Otherwise I still do not understand
how the previous draw buffer get restored after
applying an fbo.

All current implementations/examples do only work
because there is a call to glDrawBuffer in the
RenderStage class, which do set the default buffer
just right before rendering. However if I am for
example not using any RenderStage to render, then
there will be no setting to default buffer.

However we will see later if this make some problems.
Maybe I will see later if there are some changes
needed, because of my non standard use of osg ;-)

Cheers,
Art 


-- Robert Osfield <robert.osfield at gmail.com> schrieb:

> Hi Art and J.P,
> 
> On Tue, Apr 15, 2008 at 6:10 PM, Robert Osfield
> <robert.osfield at gmail.com>
> wrote:
> 
> > I have merged your changes and am currently
> tweaking it so that the
> > FBO::setAttachment() method now sets up
> _drawBuffers automatically, this
> > means that its always correct, and no need to
> update it during draw avoiding
> > any threading/order of execution issues.
> >
> > If things go fine I'll check the combined changes
> in later.
> >
> 
> Things appear to have gone OK with the merge, and
> above modifications.
> J.P's osgmultiplerendertargets and osgstereomatch
> examples both work
> correctly (to my uneducated view at least).
> 
> I have now checked these changes into SVN.
> 
> Could you guys do a svn update and let me know how
> things go.
> 
> Robert.
> > _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
>
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
> 



      __________________________________________________________
Gesendet von Yahoo! Mail.
Der Lieblings-Mailbox der Welt.
http://de.overview.mail.yahoo.com


More information about the osg-submissions mailing list