PDA

View Full Version : VRML in OpenGL



06-03-2004, 05:54 AM
Hello all,

I am developing a graphic application now that loads VRML 2.0 files into Java/Java3D. This is proving to be too troublesome because of the nature of the VRML loader that I am using (Xj3D) which doesn't have much documentation at all. I improved on an in-house loader that we have but not too powerful. The process is very slow. Furthermore, the application is running too slow, I would much rather use C/C++ for performace reasons.

The only constraint that I have right now is that I must use the VRML files that I was handed down by the boss. My question is, can I convert/load/etc VRML files into OpenGL?? I know next to nothing about OpenGL but it is obviously well established and much more powerful than the VRML/Java3D combination. I know that it talks well to C/C++ so it seems like the way to go.

Any feedback would be greatly appreciated.

N. Farr

CrazyButcher
06-03-2004, 08:50 AM
yes you can render anything basically with OpenGL, it's "just" an API to draw stuff (preferrably triangles) using hw acceleration.
so its mostly a matter of proper file imports and well organized structures to draw your 3d data for the basics.
try to get the "redbook" (google for it), it explains opengl very well and introduces you to it step by step

06-04-2004, 04:21 AM
Thanks!

06-06-2004, 12:45 PM
My suggestion is that you get hold of a simple example of a VRML file. Then you will see that it describes the surface as a series of triangular facets similar to an STL file. The syntax is relatively simple so you should be able to read it in and use OPENGL to visualise it