Hi Gianluca, Curious, I never made an OSG-1.3... perhasps you mean OSG-1.2 or OSG-2.3...
W.r.t "strange" behaviour this is most likely normal OpenGL/OSG behaviour. The combination of OpenGL colour/lighting and materials is a little bit complicated and the best explanation of all the ins and outs can be found in OpenGL docs on materials. The OSG just wraps this functionality. Things are simpler when lighting is off - the colour comes from the vertex colours. There isn't any "default" colour in OpenGL, there is only the current vertex colour - effectively the last one that was applied. If you don't have vertex colours attached to your osg::Geometry then the colour will be picked up randomly from any colours that are defined in other geometries. Robert. On Tue, Nov 18, 2008 at 10:27 AM, Gianluca Natale <[EMAIL PROTECTED]> wrote: > Hi All. > I'm using an old version of OSG, ver 1.3. > I noticed a very strange behavior. > I set the material props (actually just the DIFFUSE component) > in the state set of a geode. > But, by mistake, I had also disabled lighting. > So, I would have expected that the object was drawn > using the default primary color of OpenGL, but it wasn't. > The object was drawn using as the primary color what I set > as the diffuse component of the material props. > How is it possible? > Obviously if I did it using pure OpenGL, when lighting is > disabled it always uses the primary color. > > Thanks, > Gianluca Natale > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

