Time for action—reading files from the Internet

To understand the use of a pseudo-loader, we will try to read a model from the Internet. The osgviewer utility is enough to perform this example, but you can always make use of the osgDB::readNodeFile() function to achieve the same result in your OSG-based applications.

  1. The model file already exists at the following URL: http://www.openscenegraph.org/data/earth_bayarea/earth.ive.
  2. Before trying to read files from the Internet or intranet, we'd better have a check of the OSG plugin directory to see if there is an osgdb_curl plugin. It should exist if you are installing OSG from the installer described in Chapter 2, Compilation and Installation of OpenSceneGraph. But for developers who build OSG from ...

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.