Hi ?? Could you please sign the name you wish to be addressed as. As for your attempt at making your scene white, the problem is that you are disabling lighting, and in OpenGL the glMaterial has no effect when lighting is disabled, in this case only OpenGL vertex colours and textures effect the colour of objects. So enable lighting rather than disable it.
Robert. On Mon, Aug 4, 2008 at 9:57 AM, Ariasgore <[EMAIL PROTECTED]> wrote: > I have troubles to remove every color and every lighting from a loaded > model, basically I want to to draw a model completly white without any > shading my code snippet is: > > // state is a pointer to the group where the model will be added > state->setMode( GL_LIGHTING, osg::StateAttribute::OFF | > StateAttribute::PROTECTED ); > state->removeAttribute(StateAttribute::POLYGONMODE); > state->removeAttribute(StateAttribute::MATERIAL); > osg::Material* mat = new osg::Material(); > mat->setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4(0.0,0.0,0.0,1.0)); > state->setAttributeAndModes(mat, osg::StateAttribute::ON | > StateAttribute::PROTECTED); > > Basically I set the material as protected which should work but it doesnt > for the models like axis.osg, or cessna.osg. Other model files from a model > database are rendered white but these ones keep their color and their > lighting. > Is there a way to fix that without visiting each node of the loaded models? > > Thanks > _______________________________________________ > 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

