Hi Paul,
I hope Robert also reads this ;-)
I compiled your code. Everything seems fine. I agree that
setImplicitBuffers() or even setImplicitBufferAttachments() would be more
self explanatory. I would also like to have one more (global) level of
control where I would be able to set defaults for _renderBuffersMask &
_resolveBuffersMask for all cameras. I guess Robert saw a need for this as
well, when he proposed to extend DisplaySettings for this purpose. It could
be useful for already existing code like osgShadow shadow map techniques. By
zeroing _RenderBuffersMask we could make these techniques more efficient, as
most of the shadow map cameras does not need to use COLOR_ATTACHMENTS.
Extrapolating Robert sugesstion (I am trying to guess how he would tackle
this) I would add _implicitBufferAttachmentsRenderMask &
_implicitBufferAttchmentsResolveMask flags and corresponding setters and
getters to DisplaySettings structure. I would also initilize them to
defaults you had set up for the camera in your submission: ie
USE_COLOR_BUFFER | USE_DEPTH_BUFFER. In the Camera class I would add one
more enum value USE_DISPLAY_SETTINGS_MASK and would make it a default for
the Camera. This flag would mean that Camera honors flags set in associted
DisplaySettings. So it would be possible to setup defaults for all cameras
by simply changing masks in DisplaySettings instance. And it would be easy
to override global defaults with the flags and methods you added when
creating a camera. Would this work for you ?
I will prepare and submit a code with these modifications if you accept
general direction.
Cheers,
Wojtek Lewandowski
----- Original Message -----
From: "Paul Martz" <[email protected]>
To: "OpenSceneGraph Users" <[email protected]>
Sent: Saturday, October 24, 2009 10:38 PM
Subject: Re: [osg-users] Improving multisampled FBO
Wojciech Lewandowski wrote:
> Hi Paul,
>
> Thank You. I like your solution. I cannot test it now, will do it on
> monday and let you know how it went.
Have a good weekend. :-)
I'm starting to think a better name for this entry point would be
setImplicitBuffers(), as that's what it really does: it lets the app tell
OSG what buffer attachments to create implicitly.
But take a look when you have time and give me your thoughts, I'm open to
suggestions.
Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org