From 5f9c6a01704e26e6760cc023e09ab1dcf0da1a15 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 4 Sep 2018 15:26:30 +0100 Subject: [PATCH] Changed the ShapeDrawable::build() methpd so that it does run when the ShadpwDrawabe is a KdTree. --- src/osg/ShapeDrawable.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/osg/ShapeDrawable.cpp b/src/osg/ShapeDrawable.cpp index 12bed5d2d..635df73d1 100644 --- a/src/osg/ShapeDrawable.cpp +++ b/src/osg/ShapeDrawable.cpp @@ -13,6 +13,7 @@ #include #include #include +#include using namespace osg; @@ -76,6 +77,9 @@ void ShapeDrawable::setTessellationHints(TessellationHints* hints) void ShapeDrawable::build() { + // we can't create a tessellation for a KdTree + if (dynamic_cast(_shape.get())!=0) return; + // reset all the properties. setVertexArray(0); setNormalArray(0);