Summary
In this chapter, we mainly discussed about the file I/O mechanism, including the use of plugins and the chain-of-responsibility design pattern in OSG. The osgDB::Registry
is the singleton class storing all of the reader-writers and wrappers which are linked in at runtime for reading native and non-native file formats. By the end of this chapter, we were able to understand how OSG plugins work, and how to implement a new plugin reading and writing interface with user-defined subclasses of the osgDB::ReaderWriter
base class.
In this chapter, we have learnt:
How to load files of a specified extension, and searching for a specific plugin in the table provided
How to understand the pseudo-loaders, and how to load files from the Internet, using the
osgdb_curl
pluginRe-configuring the CMake build system to set third-party dependency options for OSG plugins, which will enable related file formats to be readable or writable
A basic way to construct the native compiling tool-chain of OSG and third...