Step 4: Displaying the Overlay Surface

After creating your overlay surface, you can display it. Often, display hardware imposes alignment restrictions on the position and pixel width of the rectangles you use to display the overlay. Additionally, you will often need to account for a minimum required stretch factor by adjusting the width of the destination rectangle in order to successfully display the overlay surface. The Mosquito sample performs the following tasks to prepare and display the overlay surface:

·Step 4.1: Determining the Minimum Display Requirements

·Step 4.2: Setting Up the Source and Destination Rectangles

·Step 4.3: Displaying the Overlay Surface