From f034ca6d745dd677097c5d2906fad6e7aeeb833d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 20 Jan 2003 11:07:41 +0000 Subject: [PATCH] Fixed osglogo demo so that is correctly set up the colour of the background. --- src/Demos/osglogo/osglogo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Demos/osglogo/osglogo.cpp b/src/Demos/osglogo/osglogo.cpp index c4f0022c7..ab8e9ce58 100644 --- a/src/Demos/osglogo/osglogo.cpp +++ b/src/Demos/osglogo/osglogo.cpp @@ -252,6 +252,11 @@ osg:: Node* createBackdrop(const osg::Vec3& corner,const osg::Vec3& top,const os geom->setNormalArray(normals); geom->setNormalBinding(osg::Geometry::BIND_OVERALL); + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); + geom->setColorArray(colors); + geom->setColorBinding(osg::Geometry::BIND_OVERALL); + geom->addPrimitiveSet(new osg::DrawArrays(GL_QUADS,0,vertices->getNumElements())); osg::Geode* geode = new osg::Geode();