NVPR Text Wheel

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


This sample demonstrates using the NV_path_rendering OpenGL extension to draw text arranged like spokes in a wheel, with a slight 3D projection applied to the rendering.

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
F Toggle Path Fill
S Toggle Path Stroke
gamepad Y Toggle Animation
Left Shoulder Button Toggle Path Fill
Right Shoulder Button Toggle Path Stroke

Technical Details

This sample demonstrates NV_path_rendering drawing spinning text with a slight projection applied to the text arranged in a spinning wheel. The shading of the text uses a smooth color gradient generated with glPathColorGenNV.

The glyphs for the text on the spinning wheel are created with the glPathGlyphRangeNVcommand.

The text spacing with kerning is determined with the glGetPathSpacingNVquery.

The instanced path APIs are used to efficiently draw the filled and stroked text:

See Also



NVIDIA® GameWorks™ Documentation Rev. 1.0.220830 ©2014-2022. NVIDIA Corporation and affiliates. All Rights Reserved.