From Miha Ravšelj and Robert Osfield, fix for serializer bug in osgText::TextBase and osg::Camera

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14711 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2015-02-23 11:43:21 +00:00
parent 685a270c18
commit 594b3064c0
2 changed files with 8 additions and 8 deletions

View File

@@ -143,10 +143,10 @@ static bool writeClearMask( osgDB::OutputStream& os, const osg::Camera& node )
else
{
std::string maskString;
if ( mask==GL_COLOR_BUFFER_BIT ) maskString += std::string("COLOR|");
if ( mask==GL_DEPTH_BUFFER_BIT ) maskString += std::string("DEPTH|");
if ( mask==GL_ACCUM_BUFFER_BIT ) maskString += std::string("ACCUM|");
if ( mask==GL_STENCIL_BUFFER_BIT ) maskString += std::string("STENCIL|");
if ( (mask & GL_COLOR_BUFFER_BIT)!=0 ) maskString += std::string("COLOR|");
if ( (mask & GL_DEPTH_BUFFER_BIT)!=0 ) maskString += std::string("DEPTH|");
if ( (mask & GL_ACCUM_BUFFER_BIT)!=0 ) maskString += std::string("ACCUM|");
if ( (mask & GL_STENCIL_BUFFER_BIT)!=0 ) maskString += std::string("STENCIL|");
if ( !maskString.size() ) maskString = std::string("NONE|");
os << maskString.substr(0, maskString.size()-1) << std::endl;
}

View File

@@ -159,10 +159,10 @@ static bool writeDrawMode( osgDB::OutputStream& os, const osgText::TextBase& tex
else
{
std::string maskString;
if ( mask==osgText::TextBase::TEXT ) maskString += std::string("TEXT|");
if ( mask==osgText::TextBase::BOUNDINGBOX ) maskString += std::string("BOUND|");
if ( mask==osgText::TextBase::FILLEDBOUNDINGBOX ) maskString += std::string("FILLED|");
if ( mask==osgText::TextBase::ALIGNMENT ) maskString += std::string("ALIGNMENT|");
if ( (mask&osgText::TextBase::TEXT)!=0 ) maskString += std::string("TEXT|");
if ( (mask&osgText::TextBase::BOUNDINGBOX)!=0 ) maskString += std::string("BOUND|");
if ( (mask&osgText::TextBase::FILLEDBOUNDINGBOX)!=0 ) maskString += std::string("FILLED|");
if ( (mask&osgText::TextBase::ALIGNMENT)!=0 ) maskString += std::string("ALIGNMENT|");
if ( !maskString.size() ) maskString = std::string("NONE|");
os << maskString.substr(0, maskString.size()-1) << std::endl;
}