Introduction
A friend asked me once about a way to convert 3D files such 3D Studio 3Ds, VLMR, OBJ and so on with one engine able to work in almost all platforms. Well, lots of Googling around, came to me OpenSG - Open source portable scenegraph system to create realtime graphics programs (this comes from their website...). To simplify things, OpenSG is a huge library, and you can make things like work with threads natively, open almost every kind of 3D file, modify and save.
Using the Code
There is not much to do to build this project, except for about 40MB in library downloads (don't worry, my bet is: you will use it more than this time...).
You will need WxWidgets and OpenSG to build the sample.
WxWidgets
The main download page is at http://www.wxwidgets.org/downloads/. Choose the wxMSW port, download and run. Follow the install instructions. My install path is "C:\library\cpp\wxWidgets-2.8.6", and if you'd like to use the same idea, you will not have to change any path in the project include/library options.
Before you start building, go to "include\wx\msw\setup.h", in line 994, you will find this define:
#define wxUSE_GLCANVAS 0
Change the value to 1
. The result should look like this:
#define wxUSE_GLCANVAS 1
This is necessary to enable the use of OpenGL library in the WxWidgets frames.
Save the file and build wxWidgets (The default project compiles with just some warnings about deprecated functions. Here it takes about 3 minutes to build).
OpenSG
The main download page is at http://www.opensg.org/dailybuild_logs/index.EN.html. You will find a very strange table in there. Ok, no problem. Just look for the Dists column. There you can see the Win32/Visual Studio build (cl.net200X), with the binary download. It is a single 30MB file download. Download and install it. Again, my install path is "C:\library\cpp\OpenSG", but using it is up to you. A little change in the project options (include/library) can just allow you to use any path you like.
I tried to use the 2.0 version of OpenSG (from svn). No VC project (if you try to build the 1.8 from source, you will be successfull with not many efforts), a lot of changes in library classes. The result is: I can't build it. I really don't like scons, and retrieve a good VC project from his config files? Oh joy... I give up and just download the binary build.
History
- 9th November, 2007: Initial post