Chapter 3. Installing and Configuring VC

This chapter explains how to install and use VC. The first section describes the syntax of the Makefile and its options. The second section is dedicated to the syntax of the command line, and to the commands for user interaction in the browsing mode. The following sections detail the elements of the configuration file.

3.1. Installing

The current version of the Makefile is designed for Unix systems. Since VC is built on C++/OpenGL programs, it has been successively compiled on MaxOS/X and Windows32 systems. Next versions of the Makefile should be more elaborate in order to facilitate the installation on these systems.

3.1.1. Compiling and Installing VC

The source files of VC come as a compressed archive file named virchor-(version).tgz in which (version) is the current version number, for instance 1.2.0

After downloading the archive from the repository and copying it to a working directory named working_directory, the basic installation of VC is made in three steps:

  • decompress the archive,

  • unpack the archive

  • build the application.

$ cd working_directory/
$ gunzip virchor-(version).tgz
$ tar xvf virchor-(version).tar
$ cd virchor-(version)
$ configure
$ make

If you have the permissions to access the installation directory (the default installation directory is /usr/local), you can copy the compiled application to a standard installation directory through the command:

$ make install

Then VirChor can be run by typing

  • either type the full pathname as in

    working_directory/virchor-(version)/bin/VirChor <configuration-file> <scene-file>
    
  • or if you have chosen "make install", just type

    
VirChor <configuration-file> <scene-file>
    
More details about the syntax for running VC can be found in Section 3.2.

3.1.2. Makefile Configuration

The distribution of VC contains a standard configure command for generic applications. In order to adapt the configuration of VC to your particular needs, you can add options to the configure command line.

There are basically three options variables that you can add:

  • The option --enable-double-screen offers the possibility of having an additional window for monitoring the output of VC.

    If this option is set, it is possible to require two rendering windows in the configuration file: one for regular graphic output and one for a passive copy of the scene (see Section 3.26 for more details on window configuration). In order to compile VC with this option, a patch of the GLUT distribution is built in order to be able to share OpenGL context between windows (vc-glut-patch.o). For this reason, the GLUT source files must downloaded before compiling VC in the double-window mode. [1]

  • The option --enable-Cg offers the possibility of calling Cg programs from VC. (Cg is a toolkit and a programming language for NVIDIA graphic cards.)

    If this option is set, it is possible to link Cg programs with VC through the burst element. This feature is not documented currently. It should be made more generic and easier to use in the future. In order to compile VC with this option, VC must be linked with some libraries of the Cg compiler. For this reason, the Cg compiler must downloaded before compiling VC in the Cg mode. [2]

  • The option --enable-ffmpeg offers the possibility of using videos for texturing objects through the ffmpeg library. (ffmpeg provides two libraries libavcodec and libavformat to record, convert, and stream audio and video.)

    If this option is set, it is possible to link ffmpeg to VC and to use video material properties for geometrical objects. In order to compile VC with this option, VC must be linked with the libavcodec and libavformat libraries. For this reason, the libraries and their associated headers compiler must downloaded before compiling VC with this option. [3]

For instance, the following command configure VC in the single window mode, with support for Cg shaders, and with video texturing.

./configure --enable-double-screen --enable-ffmpeg

Notes

[1]

GLUT is distributed in source code form at http://www.opengl.org/resources/libraries/glut/glut_downloads.html. GLUT is not Open Source. Mark Kilgard maintains the copyright.

[2]

Cg compiler can be downloaded from http://developer.nvidia.com/object/cg_toolkit.html.

[3]

libavcodec and libavformat libraries can be downloaded from http://ffmpeg.sourceforge.net/.