Hi Jan
1) I was able to see the teapot in your sample.wrl when I ran it with my own
program.
2) My file has a Material node that looks like:
appearance Appearance {
material Material {
}
}
3) I wrote out a version of it with much less geometry.
I was able to load it in both osgviewer and in my program when I got rid of:
Group {
children [
here is the whole vrml file
]
}
which was around the whole thing.
4) However, my vrml files has:
color Color {
color [
0.000000 0.304099 0.989031,
0.000000 0.315067 1.000000,
0.000000 0.315067 1.000000,
0.000000 0.315067 1.000000,
0.000000 0.315067 1.000000,
0.000000 0.315067 1.000000,
0.000000 0.315067 1.000000,
0.000000 0.315067 1.000000,
]
}
colorPerVertex TRUE
And after it loads it the color is gone. I wrote out the scene graph in .osg
format immediately after loading the file and then looked at it. I should see
something like:
ColorBinding PER_VERTEX
ColorArray Vec4Array 26238
{
0.532572 0.573407 0.544219 0.506753
...
in the .osg file but in the one that got saved after loading my test wrl file
I dont get any colors. Getting per vertex colors into the scene graph is
critical when doing scientific visualization as it is very common to color
each vertex by the data value at that particular point in the data cube.
5) With osgviewer I can load my test wrl file and see the image of the
geometry but with my own program, while I can load the wrl file, my program
crashes whenever I start up or navigate to a position in which the geometry
can actually be seen. It crashes in the call to:
mSceneView ->draw();
where:
osg::ref_ptr< osgUtil::SceneView > mSceneView;
This happens both when I load the wrl file and when I load the .osg file that
I saved from it.
Thanks for your help.
Joan Slottow
_______________________________________________
Osg-Users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org