Summary

This chapter provided a simple guide to creating your own simple OSG program with the CMake tool, and introduced some practical utilities. OSG uses smart pointers heavily for efficient manipulation of operating system resources allocated for each scene graph node at run time, which is crucial to the performance of these safety-critical programs. To help understand the working principle of smart pointers, we spent much of the chapter explaining the use of osg::ref_ptr<> and how to calculate the referenced count, and discussing various situations that may occur when managing OSG scene elements.

In this chapter, we specifically covered:

  • How to write a simple CMake script file and make it work with your own source code and OSG dependencies

Get OpenSceneGraph 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.