Vrui 2.2-xxx Release Notes
-
Many obsolete classes have been removed from Vrui's component libraries, or replaced by new classes based on improved abstractions:
- The entire CharacterSource class hierarchy has been replaced by the more powerful IO::File abstraction provided by the IO and higher libraries.
- Comm::TCPPipe is now based on the Comm::NetPipe abstraction, and no longer a kludgy stand-alone class.
- The IO library introduced in Vrui-2.1 has been expanded, and has obsoleted several older classes and class hierarchies. The base classes provided by IO and its higher libraries are:
- IO::File for endianness-safe binary and character-based file access.
- IO::SeekableFile, derived from IO::File, for endianness-safe binary and character-based file access with seek operations. IO::SeekableFile objects have two different pointers: one for read access, one for write access. These pointers can be read and set separately using the get/setReadPos and get/setWritePos methods, respectively.
- IO::Directory to traverse a file system's directory structure, and open files relative to a given directory.
- Comm::Pipe, derived from IO::File, for endianness-safe binary and character base access to communication pipes, e.g., device ports or network sockets. The primary difference between a file and a pipe is that reading from a pipe can introduce arbitrary delays, and that read accesses to a pipe do not mirror back data written by previous write accesses.
- Comm::NetPipe, derived from Comm::Pipe, represents network communication pipes and has new methods to query Internet addresses and port numbers of both ends of a given pipe.
-
The Comm library has been split into the new Comm library, concerned with device and socket communication, and the new Cluster library, concerned with intra-cluster communication. This has led to some class and function name changes that will break existing code, but are easy to fix via search-and-replace:
- Comm::MulticastPipeMultiplexer is now Cluster::Multiplexer.
- Comm::MulticastPipe is now Cluster::MulticastPipe.
- Comm::GatherOperation is now Cluster::GatherOperation.
- Vrui::getMulticastPipeMultiplexer() is now Vrui::getClusterMultiplexer().
-
Client code is expected to mostly interact with the IO and its higher libraries through base classes and the following convenience functions only:
- IO::openFile takes a file name and access mode, and returns a new IO::File object of appropriate concrete type.
- IO::openSeekableFile takes a file name and access mode, and returns a new IO::SeekableFile object of appropriate concrete type.
- IO::openFile and IO::openSeekableFile can handle regular files, and provide transparent access to gzip-compressed files with the .gz file name extension.
- IO::openDirectory takes a directory name and returns a new IO::Directory object of appropriate concrete type.
- Comm::openFile and Comm::openSeekableFile are the same as their IO counterparts, but can handle additional file types such as remote HTTP/1.1 files (detected via the http:// file name prefix).
- Cluster::openFile, Cluster::openSeekableFile, and Cluster::openDirectory are the same as their IO or Comm counterparts, but distribute files across a cluster in a transparent manner.
- Cluster::openTCPPipe returns a cluster-transparent TCP pipe to a remote server.
- Vrui::openFile, Vrui::openSeekableFile, and Vrui::openDirectory are the same as their Cluster counterparts, but use Vrui's own cluster multiplexer to distribute files.
-
The GLMotif::FileSelectionDialog constructor no longer takes the name of the starting directory as a string, but now expects the starting directory as a pointer to an object derived from IO::Directory. It also no longer uses the current directory as starting point when a NULL name is passed. This old code:
new GLMotif::FileSelectionDialog(widgetManager, "Name", 0, fileNameFilters)
has to be replaced by:
new GLMotif::FileSelectionDialog(widgetManager, "Name", IO::openDirectory("."), fileNameFilters)
and this old code:
new GLMotif::FileSelectionDialog(widgetManager, "Name", "/path/to/directory", fileNameFilters)
has to be replaced by:
new GLMotif::FileSelectionDialog(widgetManager, "Name", IO::openDirectory("/path/to/directory"), fileNameFilters)
or their counterparts, Cluster::openDirectory or Vrui::openDirectory. Since GLMotif::FileSelectionDialog can no longer open the current directory itself (at least not in a portable fashion), passing a NULL pointer for the directory will cause a crash.
-
The structure of the GLMotif::FileSelectionDialog::OKCallbackData callback data structure has changed. Instead of containing the fully-qualified name of the selected file, it now contains the currently-displayed directory as a pointer to an IO::Directory object, and the name of the selected file relative to that directory. To provide (almost) backwards compatibility, the callback data structure contains a convenience method to return a fully-qualified path name, which obviously will not work if the directory is not a standard local file system directory (e.g., if the directory is inside a ZIP archive, or is cluster-transparent, or a remote directory).
-
Many higher-level classes and functions that used to expect file or directory names as strings now expect objects derived from IO::File or IO::Directory, respectively. In most cases, the old interfaces have been retained for backwards compatibility, in which case the classes use IO::openFile or IO::openDirectory internally. This replicates old behavior, but does not provide the advantages of the new IO abstractions, such as transparent access to gzipped, remote, or cluster-transparent files.
-
Vrui-2.2-001 is the first Vrui release with navigation transformation double-buffering disabled by default. If this leads to strange behavior in Vrui applications, the previous default can be restored by setting the value of DELAY_NAVIGATIONTRANSFORMATION at the top of the file Vrui/Internal/Vrui.General.cpp to 1, and rebuilding and then reinstalling Vrui.