OpenGL support module for Chrono.
Features
The OPENGL module is used for run-time visualization of Chrono simulations.
Compared to the VSG or IRRLICHT module modules, this run-time visualization module provides a lower-level access to real-time 3D visualization and a more limited set of visualization features, but it uses less resources and it can be useful in case of large number of objects (e.g., for visualization of granular dynamics simulations).
Dependencies
Building and installing prerequisistes
The simplest way to build and install all requirements for the Chrono::OpenGL module is to use the utility scripts provided with the Chrono distribution. These scripts (buildGL.bat
and buildGL.sh
, for Windows and Linux, respectively) are available in the contrib/build-scripts/vsg
directory of the Chrono repository.
- Copy the appropriate script and place in an arbitrary temporary directory.
- Edit the script copy to:
- Force a download of the GL library codes.
- Specify the install directory (set the variable
GL_INSTALL_DIR
). - Decide whether to build shared libraries and whether to also build debug libraries.
- Run the script (
.\buildGL.bat
orsh buildGL.sh
, as appropriate) from the location of the script copy. This will create a temporary directory where all source repositories will be cloned and a set of directories where the individual URDF dependencies are built. - The install directory will contain (under subdirectories of
GL_INSTALL_DIR/lib/cmake
) all GL CMake project configuration scripts required to configure Chrono with the Chrono::OpenGL module enabled.
Building instructions
- Repeat the instructions for the full installation, but when you see the CMake window, you must add the following steps:
- Set the
ENABLE_MODULE_OPENGL
as 'on', then press 'Configure' (to refresh the variable list) - When prompted, provide the paths to the various GL project configuration scripts (
GLEW_DIR
,glfw3_DIR
) as well as the path to tyheGLM
include headers. - Press 'Configure' again, then 'Generate', and proceed as usual in the installation instructions.
On Windows, you can either copy the dependency DLLs to the same directory as the executables or else add the path to these shared libraries to the
PATH
environment variable.On Linux, you may need to append to the
LD_LIBRARY_PATH
environment variable.