Yes, which is what I wrote: "What is the idea behind having a color in ShapeDrawable?"
I cant see any reason why there would be a color associated to a shape? Create a triangle, and by the way, its red. That was my question. So if you WOULD like to control the color by disabling light and use diffuse, it will not work. It will be white (due to the call in ShapeDrawable). Anyway, there are ways around this. I just thought it was very inconsistent to associate a color to a ShapeDrawable. /Anders On Fri, Dec 2, 2011 at 9:53 AM, Filip Arlet <fili...@seznam.cz> wrote: > Hi, > > in OpenGL if GL_LIGHTING is disabled, the final color of polygon is > determined by glColor. > > If you see ShapeDrawable::drawImplemenation(), there is glColor call. > > > Code: > > osg::State& state = *renderInfo.getState(); > GLBeginEndAdapter& gl = state.getGLBeginEndAdapter(); > > if (_shape.valid()) > { > gl.Color4fv(_color.ptr()); ///// <--------- > > DrawShapeVisitor dsv(state,_tessellationHints.get()); > > _shape->accept(dsv); > } > > > > > Cheers, > Filip[/code] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=44181#44181 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- __________________________________________ Anders Backman, HPC2N 90187 Umeå University, Sweden and...@cs.umu.se http://www.hpc2n.umu.se Cell: +46-70-392 64 67
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org