Hi Eldar, I you don't assign a colour to a geometry and the shader/fixed function pipeline is using colour then it'll inherit it's state from the last time that it was applied, in your case it would have been other geometry in your scene. If you want a specific colour on geometry then you need to apply one as you have done.
Robert. On 20 March 2012 13:48, Eldar Insafutdinov <[email protected]> wrote: > Hi > > I was able to find a workaround to this problem by adding an overall white > colour to the textured quad > > > Code: > > osg::ref_ptr<osg::Vec4Array> colors = new osg::Vec4Array; > colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f)); // needs to be white! > > geom->setColorArray(colors.get()); > geom->setColorBinding(osg::Geometry::BIND_OVERALL); > > > > > This made the quad a bit brighter, and fixed an issue of affecting its > texture by another geometry's colour. But I still don't understand, if it is > a workaround or a proper solution to the problem I had. > > Thank you, > Eldar > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=46438#46438 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

