Hi Anders,

Hence, it makes no sense storing a color in ShapeDrawable.

Well, it makes as much sense as having a color array for an osg::Geometry... :-)

I think it's not having a color in ShapeDrawable that's the problem, it's having no way of having no color. In other words, in osg::Geometry you have the ability to either set a color array or not. You should have the same ability in ShapeDrawable, i.e. set a color or not. Since osg::Color doesn't really have a "no color" value, you probably need an additional bool saying "use the color or not". When _useColor == false, then no glColor call would be made by ShapeDrawable itself, and the one from osg::Material would take effect.

Or you could just do what Robert always says, ignore ShapeDrawable even exists (except for simple debug geometry) and use osg::Geometry directly. Then you can do what you want.

I've wanted to rewrite ShapeDrawable to use osg::Geometry internally for a while, but I think Paul beat me to it in osgWorks... :-)

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                    http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to