From Miha Ravselj, "Regarding previous submission it was only partial solution. After further testing I found similar bug also in ClearNode serializer.
//GLbitfield mask = GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT; This line was problematic since it produced incorrect result when let's say COLOR flag is serialized it should be null as in Camera serializer or in a proposed BitFlagsSerializer This line of code caused that whenever only GL_COLOR_BUFFER_BIT bit was written and on value read GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT was restored instead of GL_COLOR_BUFFER_BIT only. //GLbitfield mask = 0; //this resolves the issue same as in camera Also same bit-wise comparison bug was also present in write method. ------------------------------------------------------------------------------------- As you can see there are total 3 bit mask serializers in OSG and all 3 had bugs so I decided to add ADD_BITFLAGS_SERIALIZER and replace USER serializers in osg::Camera, osg::ClearNode and osgText::TextBase. I have made sure that bitflags serializer does not break backwards-compatibility since it uses same code as user serializer does in all 3 cases. (see tester.cpp on how compatibility test was performed)" git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14752 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -21,9 +21,6 @@
|
||||
namespace osgDB
|
||||
{
|
||||
|
||||
typedef std::vector<std::string> StringList;
|
||||
extern OSGDB_EXPORT void split( const std::string& src, StringList& list, char separator=' ' );
|
||||
|
||||
struct MethodObject : public osg::Referenced
|
||||
{
|
||||
typedef std::vector< osg::ref_ptr<osg::Object> > Parameters;
|
||||
|
||||
Reference in New Issue
Block a user