PDA

View Full Version : VRML loader with CyberX3D



07-15-2004, 12:52 AM
For those who are interesting in vrml object loading with an opengl render.

I've a little problem using CyberX3D and the X3D Browser sample.
I try to load a simple vrml object as following:

#VRML V1.0 ascii
Separator {
DirectionalLight {
direction 0 0 -1 # Light shining from viewer into scene
}
PerspectiveCamera {
position -8.6 2.1 5.6
orientation -0.1352 -0.9831 -0.1233 1.1417
focalDistance 10.84
}
Separator { # The red sphere
Material {
diffuseColor 1 0 0 # Red
}
Translation { translation 3 0 1 }
Sphere { radius 2.3 }
}
Separator { # The blue cube
Material {
diffuseColor 0 0 1 # Blue
}
Transform {
translation -2.4 .2 1
rotation 0 1 1 .9
}
Cube {}
}

and I've got an "error syntax error line (2): Separator".
I don't understand, it's a pretty simple object ?!
The separator node is a basic one, no ?

Thanks for your answer