[osg-users] Main branch MSFBO support change

Paul Martz pmartz at skew-matrix.com
Thu Nov 19 13:30:38 PST 2009


Confirming Wokciech's comments, and can't wait to look at the final 
committed code to see whether bitmasks are signed or unsigned. :-)

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466



Wojciech Lewandowski wrote:
> Robert, Paul and everyone interested,
> 
> My changes in "Re: [osg-submissions] DisplaySettings masks 
> forimplicitbufferattachments" were based on initial Paul submission. And 
> of course my submission included Pauls changes and added support for 
> setting IMPLICIT_BUFFER_ATTACHMENT policy through DisplaySettings. You 
> may treat last of my "DisplaySettings masks 
> forimplicitbufferattachments" posts as final result of my and Paul 
> colaboration on this topic.  Btw I just have submitted  RenderStage cpp 
> modifications made versus Roberts latest merges in today SVN.  I believe 
> topic of  "implicit buffer attachemnts for fbo and msfbo" will be closed 
> when Robert merges my today fixes I just posted.
> 
> Cheers,
> Wojtek
> 
> 
> ----- Original Message ----- From: "Robert Osfield" 
> <robert.osfield at gmail.com>
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Sent: Thursday, November 19, 2009 1:22 PM
> Subject: Re: [osg-users] Main branch MSFBO support change
> 
> 
>> Hi Paul,
>>
>> I haven't reviewed this submission yet, but it clearly overlaps with
>> the changes that Wojtek was working on.  I've already checked in some
>> of Wojtek's changes (the interface changes to osg::Camera and
>> osg::DisplaySettings) but haven't checked in the changes to
>> RenderStage.cpp.  I'm awaiting feedback from Wojtek before merging the
>> remaining elements his changes.
>>
>> Could you give me a heads up on where you think we stand with respect
>> this submission?  Is it complimentary, no longer needed at all, will
>> need to be refactor?
>>
>> I'll hold off from doing a review of your changes till you give me a 
>> heads up.
>>
>> Cheers,
>> Robert.
>>
>> On Sat, Oct 24, 2009 at 8:09 PM, Paul Martz <pmartz at skew-matrix.com> 
>> wrote:
>>> Hi Robert -- Here is my submission to increase application control over
>>> implicit creation of FBO attachments, MSFBO resolve attachments, and 
>>> blit,
>>> as discussed in the thread "Improving multisampled FBO".
>>>
>>> By default, the current behavior is preserved, which means that OSG
>>> implicitly creates both color and depth FBO attachments if they were not
>>> already attached to the Camera. In the multisampled case, this is 
>>> done for
>>> both the multisampled FBO as well as the resolve FBO.
>>>
>>> However, the app can now explicitly set a mask to control which 
>>> attachments
>>> OSG creates implicitly, using Camera::setUseBufferMasks(). There is a 
>>> mask
>>> bit for color, depth, and stencil. The default is USE_COLOR_BUFFER |
>>> USE_DEPTH_BUFFER.
>>>
>>> If you pass you parameter and are not using MSFBO, the mask controls the
>>> attachments to the rendered FBO.
>>>
>>> If you are using MSFBO, then you can pass two parameters: the first 
>>> controls
>>> attachments to the multisampled FBO, and the second controls 
>>> attachments to
>>> the resolve FBO.
>>>
>>> I've also changed the computation of the glBlitFramebuffer mask. 
>>> Formerly,
>>> this iterated over all attachments to compute the mask, once per 
>>> frame --
>>> very inefficient. This was really unnecessary, as OSG always copies all
>>> attachments. Now, the code simply sets all bits and lets OpenGL sort 
>>> it out.
>>> (OpenGL silently ignores a bit if the attachment isn't set in both the
>>> source and destination FBOs.)
>>>
>>> This gives me a permanent fix for the glBlitFramebuffer issue on OS 
>>> X, as I
>>> can now explicitly leave the depth buffer out of the resolve FBO.
>>>
>>> (As an additional aside, I'll note that the current FBO handling by 
>>> Camera
>>> and RenderStage is pretty hairy and it'd be nice to completely scrap and
>>> reimplement this. However, it'd be difficult to do so without breaking
>>> backwards compatibility. So, this is best left for an OSG v3.0 change.)
>>> -- 
>>> Paul Martz
>>> Skew Matrix Software LLC
>>> _http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
>>> +1 303 859 9466
>>>
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> osg-users at lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
>>>
>>>
>>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> 
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
> 


More information about the osg-users mailing list