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 363a933f25
commit 4cdca85699

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();