Description

This samples draws the so-called 'PostScript Tiger' artwork, consisting of 240 paths specified as cubic Bezier curves and line segments.

Screenshot

APIs Used

  • NV_path_rendering
  • EXT_direct_state_access

Shared User Interface

The Graphics samples all share a common app framework and certain user interface elements, centered around the "Tweakbar" panel on the left side of the screen which lets you interactively control certain variables in each sample.

To show and hide the Tweakbar, simply click or touch the triangular button positioned in the top-left of the view.

Technical Details

This sample demonstrates NV_path_rendering drawing the classic 'PostScript Tiger' vector image.

The user interface includes four control points at the corners that you can drag interactively, which determine how the tiger is projectively warped in 3D.

The utility function quad2quad provides a matrix that maps corners of the bounds of the tiger based on the interactively repositioned corner points. This provides a modelview matrix that is loaded into OpenGL using glMatrixLoadfEXT.