Hi Robert, I just discovered a problem with the patch. When a color is specified with BIND_OVERALL, then it will not be properly applied in the non-fast path case.
What's happening is osg::Geometry is calling "arrayDispatchers.dispatch(BIND_OVERALL,0)" outside the Begin/End calls. The GLBeginEndAdapter class interprets this as no color being assigned. I was able to solve this by making the "arrayDispatchers.dispatch(BIND_OVERALL,0)" call immediately after each call to "arrayDispatchers.Begin" in osg::Geometry. I'm not sure if this is the cleanest solution. Do you have any suggestions? Cheers, Farshid On Mon, Sep 17, 2012 at 3:19 PM, Farshid Lashkari <[email protected]> wrote: > Hi Robert, > > I've encountered a case where osg::Geometry seems to be changing the > glColor value, even when no color array is specified. A lot of geometry in > our apps do not specify color arrays, and rely on an attached osg::Material > object to specify the glColor value when lighting is disabled. This has > worked fine in most cases but I recently encountered a case where no matter > what color value I specified with the osg::Material object, the color was > showing up as white. > > I believe I've tracked the issue down to the osg::Geometry object not > using fast paths. In this case the osg::Geometry object will use the > osg::GLBeginEndAdapter class to perform the rendering. I noticed that > the GLBeginEndAdapter::End() method will apply a default color, even when > no color value is explicitly assigned. Commenting out this line solved my > problem. > > I believe this should be the correct behavior, since it will now be > consistent with the fast path behavior. I've attached the modified file. > > Cheers, > Farshid > >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
