Re: [osg-users] Color in ShapeDrawable

2011-12-04 Thread Anders Backman
Farshid: head on the nail! :-) Hence, it makes no sense storing a color in ShapeDrawable. Actually, Robert, I think you implemented Shape and ShapeDrawable when you were working here at VRlab in Umeå, right? ;-) Cheers, /A On Sat, Dec 3, 2011 at 12:18 AM, Jason Daly jd...@ist.ucf.edu wrote:

Re: [osg-users] Color in ShapeDrawable

2011-12-04 Thread Jean-Sébastien Guay
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

Re: [osg-users] Color in ShapeDrawable

2011-12-04 Thread Paul Martz
On 12/4/2011 6:50 PM, Jean-Sébastien Guay wrote: I've wanted to rewrite ShapeDrawable to use osg::Geometry internally for a while, but I think Paul beat me to it in osgWorks... :-) Well, I've made a start. Occasionally I even find time to add to it. Submissions are welcome. :-) In the

Re: [osg-users] Color in ShapeDrawable

2011-12-02 Thread Filip Arlet
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

Re: [osg-users] Color in ShapeDrawable

2011-12-02 Thread Anders Backman
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

Re: [osg-users] Color in ShapeDrawable

2011-12-02 Thread Farshid Lashkari
Hi Jason, On Fri, Dec 2, 2011 at 11:30 AM, Jason Daly jd...@ist.ucf.edu wrote: I don't understand what you mean here. If you disable lighting, material colors are irrelevant. The ShapeDrawable's colors are the ONLY way to set the color. That's actually not the case with OSG. If you look

Re: [osg-users] Color in ShapeDrawable

2011-12-02 Thread Jason Daly
On 12/02/2011 03:18 PM, Farshid Lashkari wrote: Hi Jason, On Fri, Dec 2, 2011 at 11:30 AM, Jason Daly jd...@ist.ucf.edu mailto:jd...@ist.ucf.edu wrote: I don't understand what you mean here. If you disable lighting, material colors are irrelevant. The ShapeDrawable's colors are

[osg-users] Color in ShapeDrawable

2011-12-01 Thread Anders Backman
Hi. What is the idea behind having a color in ShapeDrawable? What this means, is that if you create a ShapeDrawable, and stitch a material in a node above it, you cannot control the color through a material when lighting is disabled. So if I would like to do: material = new osg::Material;