Hi Mathias, As a quick reply - I agree with your pragmatic catch approach - catch the mode and report a warning. But haven't reviewed your changes yet, only guessing...
Ideally of course we wouldn't have glColorMaterial set from within osg::Material and have a separate osg::ColorMaterial StateAttribute and associated mode. I'll need some time to ponder how we might migrate to having a separate ColorMaterial. When I complete my current merge task I'll have a gander over your changes, and think some more about this issue. Robert. On Fri, Sep 19, 2008 at 4:06 PM, Mathias Fröhlich <[EMAIL PROTECTED]> wrote: > > Robert, > > I am not sure if this is a good thing. > But if we had that before it would have saved me from some debugging time > here ... > > You remember that there is a problem that the Material StateAttribute sets the > Enable/Disable model for GL_COLOR_MATERIAL. This can potentially and does > break state tracking of osg. > We already have that partial workaround that the Material StateAttribute does > not tell anything about the GL_COLOR_MATERIAL mode usage. Also osg itself is > safe as it does not set the GL_COLOR_MATERIAL on any StateSet in osg's > sources. > But nobody saves any user - including us here - from setting GL_COLOR_MATERIAL > on a StateSet in the calling application. > > I would prefer to fix that problem at its root, but this would break > compatibility - the old story. > So I think that, when I cannot fix that problem, we can shout loud and refuse > to set GL_COLOR_MATERIAL in osg::StateSet::setMode(). > Like told above, if such code had warned me that our code still believed that > this mode should be set, I could already be at home for today :) > > What do you think? > Based on rev 8901 > > Greetings > > Mathias > > -- > Dr. Mathias Fröhlich, science + computing ag, Software Solutions > Hagellocher Weg 71-75, D-72070 Tuebingen, Germany > Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 > -- > Vorstand/Board of Management: > Dr. Bernd Finkbeiner, Dr. Florian Geyer, > Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech > Vorsitzender des Aufsichtsrats/ > Chairman of the Supervisory Board: > Prof. Dr. Hanns Ruder > Sitz/Registered Office: Tuebingen > Registergericht/Registration Court: Stuttgart > Registernummer/Commercial Register No.: HRB 382196 > > > _______________________________________________ > 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
