Quantcast
Channel: Programming – Xinyustudio
Viewing all articles
Browse latest Browse all 284

Building OpenSceneGraph with Visual Studio 2013

$
0
0

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.

  • Extract the dependency packages to “C:\Osg331\3rdParty”, use contents in either the x86 or x64 folder, but not both.
    image

 

  • Download and install CMake 2.8.12.2 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:

image

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:

 

image  image

  • Once the Configure finishes, it is important to update a few items  as below:image  image
    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
  • image image
  • 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.image image
  • 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!image
  •  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.

Filed under: osg, Programming Tagged: build, example, how to, open scene graph, osg, plugin, png, visual studio 2013

Viewing all articles
Browse latest Browse all 284