Visual Studio 2013 has been out for a few months, and OpenSceneGraph also has their latest release up to version 3.3.1. It is now possible to build OpenScenegraph, inclusive of most widely used plugins, all with Visual Studio 2013.
- Download the latest source code of OpenSceneGraph 3.3.1
source package : OpenSceneGraph-3.3.1.zip
svn tag: svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.3.1 OpenSceneGraph
- Extract it o a folder, e.g. C:\osg331
- Download the OSG Windows prebuilt dependency packages for VisualStudio 2012 & 2013.
Small package for 32 & 64 bit http://www.osgvisual.org/public_download/3rdParty_VS2013_v120_x86_x64_V9_small.7z
Full package for 32 & 64 bit http://www.osgvisual.org/public_download/3rdParty_VS2013_v120_x86_x64_V9_full.7z
- Extract the dependency packages to “C:\Osg331\3rdParty”, use contents in either the x86 or x64 folder, but not both.
- Download and install CMake 18.104.22.168 or above, this is a MUST. Otherwise, you will not see Visual Studio 2013 compiler in the drop down combo box.
- Run CMake-gui, and fill-in the needed information as below:
Note that you can tick the “Advanced” option for you to configure plugins.
- Press Configure button as in step 4 in the above snapshot.
- In the popup dialog, select “VisualStudio 12 Win64”, which corresponds to Visual Studio 2013. Click Finish button.
- The configure process continues, as below:
- Once the Configure finishes, it is important to update a few items as below:
You should change the C:/3rdparty to the dependency folder where you have extracted to, e.g. “C:\Osg331\3rdParty“. You might also take to build osg_examples. Note that if you want to build MFC examples. you have to first tick this “BUILD_OSG_EXAMPLES”, and then find the entry by searching “MFC” in the search box in CMAKE-GUI. You cannot find the “MFC” example entry without selecting BUILD_OSG_EXAMPLES”!
- Click Configure again. Type “MFC” in the serch box, and tick the “BUILD_MFC_EXAMPLE” check box
- Configure again, and then press Generate. You will find that many plugins are found. There might be some plugin missing, but these are not the most widely used ones, and we will leave it as is:
- After pressing Generate button, a solution file called “OpenSceneGraph.sln” will be created in the build folder, open that file with VisualStudio 2013.
- Build the solution by pressing Ctrl + Shift + B, now the entire solution is built from source.
- Very, very time consuming, yes, grab a dozon cups of coffee…
- Wait until it finishes, done!
- If you are really really lazy, you can download the compiled OSG for x64 Windows, compiled with Visual Studio 2013. Click below link to download. Use at your own risk and nothing is guaranteed.
- Full Pack 1.2G (inclusive of both debug and release version, source code, all plugins), pasword: 3e62
- Binary Release build + Debug build. password: 2e4f
- Binary Release build only. password: a79f
- MFC120*.dll for OSG331 VS2013. password: b013