Hi all 00

Regarding the great bitmask debate, Robert has spoken, and the winner is... (scroll down, to build suspense...)

Robert Osfield wrote:
Hi Wojtek,

On Wed, Nov 18, 2009 at 8:44 PM, Wojciech Lewandowski
<[email protected]> wrote:
I will check the code tomorrow at the company where I have my latest
changes. As I remember I later send another patch which among distupatble
bitmasks also contained few important changes in logic in RenderStage.cpp.
Have you seen and merged this one as well?

I have merged just the submission from the beginning of this thread.
This submission contained changes to RenderStage.cpp.  I had to pick
my way through the changes as the GLES/GL3 port required changes to
RenderStage as well.

Here's an svn diff of what I have applied:

svn diff

Index: include/osg/DisplaySettings
===================================================================
--- include/osg/DisplaySettings (revision 10765)
+++ include/osg/DisplaySettings (working copy)
@@ -206,6 +206,47 @@
         void setMaxBufferObjectPoolSize(unsigned int size) {
_maxBufferObjectPoolSize = size; }
         unsigned int getMaxBufferObjectPoolSize() const { return
_maxBufferObjectPoolSize; }

+        /**
+         Methods used to set and get defaults for Cameras implicit
buffer attachments.
+         For more info: See description of
Camera::setImplicitBufferAttachment method
+
+         DisplaySettings implicit buffer attachment selection
defaults to: DEPTH and COLOR
+         for both primary (Render) FBO and seconday Multisample
(Resolve) FBO
+         ie: IMPLICT_DEPTH_BUFFER_ATTACHMENT |
IMPLICIT_COLOR_BUFFER_ATTACHMENT
+        **/
+        enum ImplicitBufferAttachment
+        {
+            IMPLICIT_DEPTH_BUFFER_ATTACHMENT = (1 << 0),
+            IMPLICIT_STENCIL_BUFFER_ATTACHMENT = (1 << 1),
+            IMPLICIT_COLOR_BUFFER_ATTACHMENT = (1 << 2),
+            DEFAULT_IMPLICIT_BUFFER_ATTACHMENT =
IMPLICIT_COLOR_BUFFER_ATTACHMENT | IMPLICIT_DEPTH_BUFFER_ATTACHMENT
+        };
+
+        typedef int ImplicitBufferAttachmentMask;

...signed int! Yes, bitmasks in OSG should be signed int.

Well, I'm glad I didn't place any bets on going with the Optimizer (unsigned int) bitmask pattern, or I'd be paying out a lot of money right now.

:-)
   -Paul

_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to