Source code on GitHub
Licence: MIT
Language: C++
Status: (Very) Alpha

Pangolin for Input and Visualisation

Pangolin is a lightweight rapid development library for managing OpenGL display / interaction and video input. At its heart is a simple OpenGl viewport manager which can help to modularise 3D visualisation without adding to its complexity, and offers an advanced but intuitive 3D navigation handler. Pangolin also provides a mechanism for manipulating program variables through config files and ui integration.

The ethos of Pangolin is to reduce the boilerplate code that normally gets written to visualise and interact with (typically image and 3D based) systems, without compromising performance.

Although Pangolin may be useful in it's current state, think of it as unmaintained and probably buggy. That being said, it is permissively licenced and can be easily forked (on GitHub) for those wishing to make changes. Patches are welcome.


Manage OpenGL Viewports - A simple layout manager lets you specify viewport dimensions relative to window or parent sizes and enforce aspect ratios. Although viewport dimensions are calculated for you, you are in control of when they are activated, knowing that your OpenGL operations are within a single OpenGL context and drawn as you want.

Advanced 3D Handler - Pangolin also allows you to associate different input handlers with a viewport, and if you like, it will take care of the ModelView matrix for you. If you tell Pangolin which Projection matrix you're using for a particular viewport, it can use the depth buffer to improve manipulation with drag and rotate operations around a selected 3D point.

Input Widgets - Why would we want yet another widget toolkit you might ask? Well, these are designed specifically for prototyping to be versatile (linear / log scale, runtime adjustable resolution, custom data types, ...), fast, and integrate very simply with code.

Video Input - Pangolin can use libDC1394, FFMPEG and V4L (if they are installed) to input various kinds of video from different devices. Pangolin offers a simple C++ common interface for these sources, letting you use firewire and usb cameras, compressed images and video, and even network streams such as motion JPEG (largely thanks to FFMPEG).

Live Plotter - Often it is handy to graph scientific data. Pangolin offers a fast and simple OpenGL plotter which supports several visualisation modes (time-series, parametric, cumulative, ...) with intuitive and smooth interaction.

Record Video / Input - Pangolin also has some utilities for recording user input and lossless video, which might be handy for generating and testing datasets and in debugging.

Code Samples

Pangolin is kinda sparse on documentation. Instead, it's features are demonstrated by simple code samples, such as:

Simple Display Sample - Program variables visible in UI.

Simple Plot Sample - Live OpenGL Plotter.


by Steven Lovegrove Jump to top