Hi, Sorry for the late reply Robert, but i just saw you mail.
Since my first post i have been using the submitted code with no problem so far. Of course my use cases are but a fraction of what the community does. If i understand well your suggestion is to bind the COLOR_ATTACHMENT0 back after the for loop which blits the requested attachments? If yes i can make the change and re-submit the code. If not please explain once again your suggestion :) Anthousis Andreadis On Apr 21, 2011, at 14:22 PM, Robert Osfield wrote: > Hi Anthousis, > > On Tue, Apr 12, 2011 at 10:08 AM, Anthousis Andreadis > <[email protected]> wrote: >> my first attempt was using the _bufferAttachmentMap and i got no results. >> Actually the code never entered the loop so the structure should be empty, >> (i attach only texture to the camera). Reading from the camera on the other >> hand performed what i expected. > > It's a while since I work on this specific part of RenderStage.cpp but > reviewing the code now it looks to me like _bufferAttachmentMap is > only used keeping tabs on what buffers needt to be copied to images > after then rendering is done. If no image is copied then there is no > entry for it. This member variable is poorly named in that this role > isn't obvious - instead it reads like it's a mirror of the Camera > buffer attachment map, but it's not this. > > So I think your code is correct in use of the Camera's buffer > attachment map. One thing I think probably needs clarifying is the > settings of the glReadBuffer/glDrawBuffer within the loop, but there > isn't a reset of this afterwards which leaves the read and draw buffer > in a state that may effect later OpenGL code, and there isn't an > equivilant setting prior to th original glBlitFramebuffer call which > means that it's potentially could be effected by any previous settings > of glReadBuffer/glDrawBuffer. > > It would be useful to tie the issue of glReadBuffer/glDrawBuffer down > before merging this submission. > > Robert. > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org Anthousis Andreadis [email protected] _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
