Hi Farshid, Changes look good. The only tweak I made was to rename Reset() to reset() to keep it keeping with the rest of the OSG. The majority of the methods in the GLBeginEndAdapter and mappings of OpenGL so that when you use the glBeginEndAdapter you get gl->Vertex(), so the use of capitals in the method names is purely to keep in sync with OpenGL naming conventions.
Changes are now all merged and checked into svn/trunk. Cheers, Robert. On 19 September 2012 20:16, Farshid Lashkari <[email protected]> wrote: > Hi Robert, > > I've attached the new patch. It adds two new flags to GLBeginEndAdapter for > determining whether an overall color/normal has been specified. > GLBeginEndAdapter::End() will only apply the color/normal if the > corresponding flag is set. > > I also added a new "Reset" method to GLBeginEndAdapter which resets the new > flags. ArrayDispatchers::reset will now call the GLBeginEndAdapter::Reset > method. > > I performed a quick search through the code base to see if other code should > call the new GLBeginEndAdapter::Reset method. However, it seems as though > all the other code always specifies a color value, so the new changes > shouldn't affect it. > > Cheers, > Farshid > > On Wed, Sep 19, 2012 at 10:06 AM, Robert Osfield <[email protected]> > wrote: >> >> Hi Farshid, >> >> It would be great if you could tackle it, as you have the case that shows >> one you'll be beat place to confirm a fix. >> >> Cheers, >> Robert >> >> On Sep 19, 2012 5:50 PM, "Farshid Lashkari" <[email protected]> wrote: >>> >>> Hi Robert, >>> >>> On Wed, Sep 19, 2012 at 8:46 AM, Robert Osfield >>> <[email protected]> wrote: >>>> >>>> I've done a quick review and I'm inclined to think that the >>>> GLBeginEndAdapter needs to have another two flags that specify whether >>>> the _overallNormal and _overallColor have been set and if not then >>>> don't call _state.Normal(..) etc. >>> >>> >>> That seems like a good solution. This flag will probably need to be reset >>> before each draw though. I noticed "ArrayDispatchers::reset" is called >>> before each draw, so this might be the place to clear such flags. >>> >>> Would you like me to go ahead and implement the patch, or do you have it >>> covered? >>> >>> Cheers, >>> Farshid >>> >>>> >>>> Thoughts? >>>> Robert. >>>> _______________________________________________ >>>> osg-submissions mailing list >>>> [email protected] >>>> >>>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org >>> >>> >>> >>> _______________________________________________ >>> osg-submissions mailing list >>> [email protected] >>> >>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org >>> >> >> _______________________________________________ >> osg-submissions mailing list >> [email protected] >> >> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org >> > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
