Menu

Building OpenSceneGraph in Centos 7

Ravi Mathur Eduardo Valente

This page under construction

Building OpenSceneGraph

OpenSceneGraph provides the underlying scene graph management capabilities for OpenFrames. This page outlines the process of downloading and building the OpenSceneGraph libraries.

NOTE: This guide currently applies to Centos7.

Centos 7 Requirements:

  • CMake to generate build systems on a variety of operating systems. Used version 3.7.1 as tested.
    • Download and unpack cmake-3.7.1.tar.gz
    • cd cmake-3.7.1
    • ./bootstrap && make && sudo make install (installs in /usr/local)
  • X11 release 7.7 as tested.
  • Mesa3d -- required OpenGL libraries -- version 11.2.2 from yum repo as tested
    • Quick yum based install: sudo yum install mesa-.x86_64.
  • GCC (version 4.8.5 as tested). sudo yum install gcc-c++ and dependencies.

Download OpenSceneGraph

  1. OSG is hosted on GitHub. Use your choice of git client to clone the repo from (https://github.com/openscenegraph/OpenSceneGraph.git). Additional instructions can be found in OpenSceneGraph Git repository.
  2. Checkout the branch corresponding to the tag OpenSceneGraph-3.5.6

Note: The root OSG folder will be referred to as [OSG_FOLDER] in this page

Setup OpenSceneGraph Build System

In Terminal:

  1. cd [OSG_FOLDER]
  2. mkdir build
  3. mkdir install
  4. cd build
  5. cmake ..
  6. ccmake . (terminal based cmake that displays information in a textual based interface)
    • CMAKE_INSTALL_PREFIX = \[OSG_FOLDER\]/install
    • BUILD_OSG_EXAMPLES = ON (optional)
    • press [c] to configure
    • quit

Build OpenSceneGraph

In Terminal:

  1. cd \[OSG_FOLDER\]/buildif not already there from previous steps
  2. Type make
  3. Type make install to install the compiled OpenSceneGraph into the \[OSG_FOLDER\]/install folder
  4. Confirm that the osgversion executable is in \[OSG_FOLDER\]/install/bin

Test OpenSceneGraph

In Terminal:

  1. Add the following to your .bash_profile (or equivalent) login file:
    export OSG_ROOT=\[OSG_FOLDER\]/install
    export PATH=$PATH:$OSG_ROOT/bin
    export LD_LIBRARY_PATH=`\[OSG_FOLDER\]/install/lib64` 
  • Open a new Terminal window (so the above changes take effect), and type osgversion. It should tell you the version of OSG that you have installed.

OpenSceneGraph is now built and installed, and ready for use with OpenFrames.


Related

Wiki: Building OpenFrames for CentOS

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.