Installing OpenSceneGraph (osg) on windows

03 Jun

If you would like to install OpenSceneGraph on windows, and would like to add necessary paths to system variables automatically, you can use a batch file to save your day. The procedures will be quite simple 2-step job:


  1. Download OSG from this page, where you can select downloading source vs binary files. I would prefer to download binary one, as I barely need to touch on the source code.
  2. Run below OsgPath.Bat:
    @echo on
    setx OSG_ROOT c:\OSG301
    setx OSG_BIN_PATH  %OSG_ROOT%\bin
    setx OSG_INCLUDE_PATH  %OSG_ROOT%\include
    setx OSG_LIB_PATH  %OSG_ROOT%\lib
    setx OSG_SAMPLES_PATH  %OSG_ROOT%\share\OpenSceneGraph\bin
    setx OSG_FILE_PATH  %OSG_ROOT%\data
    setx Path “%Path%;%OSG_BIN_PATH%;%OSG_SAMPLES_PATH%;” /m

That is it. Note that:

  • You need to change “c:\OSG301” to whatever directory you installed OSG.
  • In the penultimate line, you have the choice of using “/m”, which set the path for current user, all for the whole machine (without /m).

Now open a cmd window, and type “osgversion”, you will find that it works well!



Posted by on June 3, 2013 in CAD, Programming


Tags: , , , , , , ,

2 responses to “Installing OpenSceneGraph (osg) on windows

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: