Changed the ShapeDrawable::build() methpd so that it does run when the ShadpwDrawabe is a KdTree.

This commit is contained in:
Robert Osfield 2018-09-04 15:26:30 +01:00
parent 2a4dd6e03b
commit 5f9c6a0170

View File

@ -13,6 +13,7 @@
#include <osg/ShapeDrawable> #include <osg/ShapeDrawable>
#include <osg/GL> #include <osg/GL>
#include <osg/Notify> #include <osg/Notify>
#include <osg/KdTree>
using namespace osg; using namespace osg;
@ -76,6 +77,9 @@ void ShapeDrawable::setTessellationHints(TessellationHints* hints)
void ShapeDrawable::build() void ShapeDrawable::build()
{ {
// we can't create a tessellation for a KdTree
if (dynamic_cast<KdTree*>(_shape.get())!=0) return;
// reset all the properties. // reset all the properties.
setVertexArray(0); setVertexArray(0);
setNormalArray(0); setNormalArray(0);