Small fix (from the 3.6 branch) in the osgjs plugin, avoiding a double addition of the CullFace attribute when it has been turned off. This resulted in an empty json object in the osgjs file causing warnings in osgjs.

This commit is contained in:
Andreas Ekstrand 2018-04-01 10:18:45 +01:00 committed by Robert Osfield
parent 683e201dd7
commit b8dab29562

View File

@ -1034,8 +1034,6 @@ JSONObject* WriteVisitor::createJSONStateSet(osg::StateSet* stateset)
osg::ref_ptr<osg::CullFace> defaultCull = new osg::CullFace();
cf = createJSONCullFace(defaultCull.get());
cf->getMaps()["Mode"] = new JSONValue<std::string>("DISABLE");
obj->getMaps()["osg.CullFace"] = cf;
attributeList->getArray().push_back(obj);
} else {
if (!cullFace) {
cullFace = new osg::CullFace();