<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi all,<br>
<br>
I'm using gl3 mode in my project by setting <br>
camera->getGraphicsContext()->getState()->setUseModelViewAndProjectionUniforms(_useGL3);
<br>
camera->getGraphicsContext()->getState()->setUseVertexAttributeAliasing(_useGL3);<br>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
<br>
When loading external 3D scenes created in gl2 mode colors of
geometries are coded in materials.<br>
I'm sure there is an easy way to check geometries for existence of
vertex colors and creating the <br>
vertex colors if necessary from the material in the StateSet by
usage of a NodeVisitor.<br>
<br>
I did a lot of research but couldn't figure out how to do that.<br>
In recent git sources I found Roberts patch in Material.cpp<br>
********************************<br>
void Material::apply(State& state) const {<br>
state.Color(_diffuseFront.r(), _diffuseFront.g(),
_diffuseFront.b(), _diffuseFront.a());<br>
}<br>
********************************<br>
How can I do the same in a NodeVisitor?<br>
<br>
Any help is highly appreciated.<br>
<br>
- Werner -<br>
</body>
</html>