NVPR Tiger Warp Sample


Category:  Visuals
Min PC GPU: Fermi-based (GTX 4xx)
Min Tegra Device: Tegra K1

Description

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

APIs Used

Shared User Interface

The OpenGL 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.

Other controls are listed below.

Device Input Result
touch 2-Finger Drag Translate the view
2-Finger Pinch Scale the view
mouse Left-Click Drag Translate the view
Right-Click Drag Scale the view (up:out, down:in)
keyboard Escape Quit the application
  Tab Toggle Tweakbar visibility
gamepad Start Toggle Tweakbar visibility

App-Specific Controls

This sample has the following app-specific controls:

Device Input Result
keyboard space Toggle Animation
R Reset Scene
F Toggle Path Fill
S Toggle Path Stroke
, / . Font Size -/+
gamepad Y Toggle Animation
X Reset Scene
Left Shoulder Button Toggle Path Fill
Right Shoulder Button Toggle Path Stroke
DPAD Left/Right Font Size -/+

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 quad2quadprovides 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.

See Also

 


NVIDIA® GameWorks™ Documentation Rev. 1.0.200608 ©2014-2020. NVIDIA Corporation. All Rights Reserved.