Setup Open Scene Graph On Windows
Setup Open Scene Graph On Windows
What is OpenSceneGraph?
Download OpenSceneGraph source from OSG download page, unzip it to C:\Documents and
Settings\<user>\My Documents\OpenGL
Step2: Obtain Third Party Library from OSG Site
Download third party library zipped file
Download CMake if not already installed. Start CMake GUI by double click CMakeSetup.exe,
then select the OpenSceneGraph source directory ( in our case, C:\Documents and Settings\<user>\My
Documents\OpenGL¥<OpenSceneGraphSrc> ) for both “where is the source code” and “where to build
the binaries”.
Make sure you set the ACTUAL_3DPARTY_DIR correctly or else you will have linking errors.
Set BUILD_MFC_EXAMPLE, BUILD_OSG_APPLICATIONS, and
BUILD_OSG_EXAMPLES to ON. Also, delete string in SMAKE_DEBUG_POSTFIXThen
Click Configure to update and display new values in red.
Then press OK to generate selected build files and exit.
When learning anything technology new, I find it easier to look at examples. And
OpenSceneGraph provides so many examples and they build without much tweaking. I am truly
impressed.
Step 4: Set System Environment Variables
Before running the examples from OpenSceneGraph, add the following path to the Path system
variable:
C:\Documents and Settings\u1\My Documents\OpenGL\OpenSceneGraph-2.8.2-rc2\3rdParty\bin
If you have linking errors when you run the examples, make sure your path is set correctly so
that all relevant dlls can be found.
Just double click the runexamples.bat and let yourself be amazed. This is a snapshot of a chess
board.