Programmer's Guide

The libvg Programmer's Guide is a collection of tutorials and explanatory articles that explain how to create applications using libavg. It starts with a basic Hello World tutorial and progresses to successively more complex topics.

More Information

In addition to the Programmer's Guide, we provide a complete Reference to libavg. The Reference is concise, possibly a bit terse, but much more exhaustive.

All the examples in the guide are also checked into git under src/samples, including the necessary media files. You can run them directly in that directory. The pages below give a step-by-step introduction. If you prefer working with a larger piece of code and diving in quickly, here's a tutorial based on our Firebirds sample:

Firebirds Tutorial

Instructions for installing libavg are also available.

If anything is unclear, we have a forum for questions and discussions.


Hello World: The basics of programming with libavg.

Nodes: How libavg content is structured.

Node Attributes: More on libavg content.

App: Structuring applications (Legacy documentation for the deprecated AVGApp version available as well).

Events: Dynamics - handling user input and timing.

Logger: The libavg Logging facility.

Individual Node Classes

ImageNode: Bitmaps displayed on screen.

WordsNode: Displaying text, formatting, and font handling.

VideoNode: Playing back videos.

CameraNode: Interfacing to digital cameras.

MeshNode: Displaying content using a generic triangle mesh.

Rendering Specifics

Coordinate Systems: How libavg determines where to display nodes.

Rendering Attributes: Masks, compositing and color adjustments.

Offscreen Rendering: Rendering to an offscreen buffer.

FX Nodes: Rendering with GPU-based filters.

Dynamics: Input and Animation

Mouse and Touch Input: Mouse and Touch events, the Contact class and Gesture support.

CursorEvent Bubbling and Capture: An in-depth description of how libavg routes events to nodes.

Camera Tracking: Using the computer vision system in libavg as an input device.

Timing: Details on frame timing and time-based callbacks.

Animation: Using the built-in animation framework.

Advanced Topics

Subclassing: Creating your own node classes and inserting them into a libavg scene.

Memory Management: Memory usage in libavg applications.

Multithreading: Things you need to know if you have more than one Python thread.

Plugins: Extending libavg with plugins written in C++.

Backwards Compatibility: Incompatible changes.


Environment Variables

The avgrc file

Eclipse IDE Notes