VM Labs SDK Sample Code |
\vmlabs\sample\Video\Overlay |
Copyright © 2000 VM Labs, Inc. All Rights Reserved |
December 5, 2000 |
This program demonstrates how the video overlay channel can be used.
The program creates three screen frame buffers. Two are used to double-buffer the main video channel. The third buffer is used for an overlay video channel.
The program draws a simple graphics display into the main video channel. This consists of a few colored lines that cross from one side of the screen to the other.
For the overlay channel, the program draws only text. The overlay channel's frame buffer is initialized to use an alpha channel value that represents complete transparency, so that it is invisible and you see through it to the main channel. Then the text is drawn using a different alpha channel value that makes it opaque. Finally, a portion of the text is animated so that the alpha channel value is changed frame by frame to make it slowly fade away.
The text in the overlay channel is only redrawn when something is changing, such as the animation. The rest of the time, it is not necessary to redraw the text every frame because the changes to the graphics in the main channel do not affect the overlay channel.
This example does not double-buffer the overlay channel. However, there is no reason why an application could not do so if desired.
Filename | Description |
graphics.c | Functions for creating screen display. |
vidoverlay.c | Main program code for sample. |
vidoverlay.h | Contains a variety of definitions used throughout the program |
makefile | MAKEFILE for building and running sample program. |
Before attempting to load or run any of the SDK samples, make sure you have first read the Hitchhiker's Guide To NUON document.
After that, if you're still having trouble getting this sample program to work, click here to request assistance from developer support.