Set simple Background

From JReality Wiki
Jump to: navigation, search

Source file: BackgroundExample

Run as Java webstart

This example shows how to use special appearance attributes to control the background color(s)/image of the rendered image.

The example starts up showing the use of a rectangular image as the background for the rendered scene. Pressing '1' cycles to the option of a constant background color, in this case, red. Finally, pressing '1' again shows the use of a bilinear interpolation based on colors assigned to the four corners of the rendered image. Notice that the order of the corners is (UR, UL, LL, LR).

Consult the source code for details.

Previous: Use vertex colors an a point set Developer Tutorial: Contents Next: Developer Tutorial