From Paul Martz and David Glenn,

"From David Glenn and Paul Martz. This change adds support for the NO_COLOR bit in the Vertex records' flags field. If NO_COLOR is set, and PACKED_COLOR is not set, the code will now properly default to using the face color at those vertices. See the osg-users thread "Open Flight characteristic not reflected in the current OSG" for more info."

and

"In consultation with David Glenn, it appears we needed to change a second file to correct how OpenFlight handles transparency when vertices have NO_COLOR. "
This commit is contained in:
Robert Osfield
2011-12-23 17:40:31 +00:00
parent a53308f7e8
commit 3aab31f198
2 changed files with 28 additions and 5 deletions

View File

@@ -254,7 +254,10 @@ public:
{
// Use face color if vertex color is -1 in a gouraud polygon.
// http://www.multigen-paradigm.com/ubb/Forum1/HTML/000967.html
colors->push_back(_primaryColor);
// Incorporate Face transparency per osg-users thread "Open Flight
// characteristic not reflected in the current OSG" (Sept/Oct 2011)
colors->push_back(osg::Vec4(_primaryColor.r(), _primaryColor.g(),
_primaryColor.b(), ( 1.0 - getTransparency() ) ));
}
}