Hi all,

I'm using gl3 mode in my project by setting
camera->getGraphicsContext()->getState()->setUseModelViewAndProjectionUniforms(_useGL3);

camera->getGraphicsContext()->getState()->setUseVertexAttributeAliasing(_useGL3);


When loading external 3D scenes created in gl2 mode colors of geometries
are coded in materials.
I'm sure there is an easy way to check geometries for existence of
vertex colors and creating the
vertex colors if necessary from the material in the StateSet by usage of
a NodeVisitor.

I did a lot of research but couldn't figure out how to do that.
In recent git sources I found Roberts patch in Material.cpp
********************************
void Material::apply(State& state) const {
    state.Color(_diffuseFront.r(), _diffuseFront.g(), _diffuseFront.b(),
_diffuseFront.a());
}
********************************
How can I do the same in a NodeVisitor?

Any help is highly appreciated.

- Werner -
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to