From 773df6fd22e756ec39f0ad516edd47286914eef0 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 13 Oct 2015 16:53:40 +0200 Subject: [PATCH] some OSG fixes --- apps/opencs/view/render/cellarrow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/opencs/view/render/cellarrow.cpp b/apps/opencs/view/render/cellarrow.cpp index 59460b626..720db5327 100644 --- a/apps/opencs/view/render/cellarrow.cpp +++ b/apps/opencs/view/render/cellarrow.cpp @@ -118,8 +118,9 @@ void CSVRender::CellArrow::buildShape() for (int i=0; i<6; ++i) colours->push_back (osg::Vec4f (0.8f, (i==2 || i==5) ? 0.6f : 0.4f, 0.0f, 1.0f)); - geometry->setColorArray (colours); - geometry->setColorBinding (osg::Geometry::BIND_PER_VERTEX); + geometry->setColorArray (colours, osg::Array::BIND_PER_VERTEX); + + geometry->getOrCreateStateSet()->setMode (GL_LIGHTING, osg::StateAttribute::OFF); osg::ref_ptr geode (new osg::Geode); geode->addDrawable (geometry);