hi,
maybe it is due to the MaterialGroups that are added by the vrml loader,
please inspect the resulting scenegraph using some opensg-based viewer
(for example vred).

you must care about "lit" parameter and/or "colorMaterial" parameter in
materialchunks.

cheers

francesco

>
> Hi everyone,
> I'm an opensg-newbie. I'm experiencing problems coloring vertex of a file
> .wrl
>
> Here is some code line
>
> [...]
>
> NodePtr fileNode = SceneFileHandler::the().read("object.wrl");
> GeometryPtr geo = findGeometry(fileNode); //Find geometric core
>
> GeoPositionsPtr positions = geo->getPositions();
> int numVertex = positions->getSize();
>
> for(int i = 0; i< numVertex; i++)
>     colors->addValue(Color3f(1,0,0));
>
> beginEditCP(geo);
>  geo->setColors(colors);
> endEditCP(geo);
>
> [...]
>
>
> If I load a .raw file I haven't any problem. Why?
>
> Cheers
> Portelli Carmelo
> _________________________________________________________________
> Crea il tuo blog su Spaces, condividi le tue esperienze con il mondo!
> http://home.services.spaces.live.com/
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to