From Jason Daly, "These are some fixes to the mdl and bsp plugins to handle transparency and lighting better, plus a few other tweaks."

This commit is contained in:
Robert Osfield
2009-07-16 11:21:02 +00:00
parent a232770161
commit 9eb03d450d
6 changed files with 127 additions and 30 deletions

View File

@@ -1,6 +1,7 @@
#include <stdlib.h>
#include <osg/Geode>
#include <osgUtil/TriStripVisitor>
#include "VBSPGeometry.h"
@@ -647,6 +648,12 @@ ref_ptr<Group> VBSPGeometry::createGeometry()
// Add the geometry to the geode
geode->addDrawable(geometry.get());
// Now, stripify the geode to convert the POLYGON primitives to
// triangle strips
osgUtil::TriStripVisitor tsv;
geode->accept(tsv);
tsv.stripify();
}
// Now do the same for the displacement surfaces (if any)