Hi Robert -- The code submission by Wojciech and I for MSFBO has opened a small can of worms on declaring bits and bitmasks. I hope you can weigh in and put an end to the debate.

Originally, my submission followed the Optimizer's OptimizationOptions pattern of declaring bit values in an enum, but declaring the bitmask variable as an unsigned int.

In Wojciech's modified submission, he changed the bitmask variable to a signed int, with the reasoning that enum values are also signed ints, and this eliminates the need for a typecast to get rid of compiler warnings.

This caused me to weigh in with the workaround of declaring the bit values as static const unsigned int, and keeping the bitmask unsigned. But this goes against the OSG precedent set with the Optimizer.

The ensuing discussion has covered the merits, or lack thereof (depending on the poster) of declaring bitmasks as signed or unsigned.

What this really boils down to is: If we decide that the MSFBO bit/bitmask declarations should be different from the Optimizer pattern for bits and bitmasks, then we should change the Optimizer to follow the new standard, and also do the same for any other classes that followed the Optimizer's current pattern.

If you could post with "do it this way" or "do it that way", I (for one) could get back to work and stop prodding everyone with my code style opinions. :-)

Thanks,
--
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

Reply via email to