DirectX SDK |
This topic pertains only to application development in C and C++. See DirectDraw Visual Basic Samples.
The DDEx3 program is an extension of DDEx2. This example demonstrates the use of off-screen surfaces.
Source: (SDK root)\Samples\Multimedia\DDraw\Src\Ddex3
Executable: (SDK root)\Samples\Multimedia\DDraw\Bin\Ddex3.exe
DDEx3 requires no user input. Press F12 or ESC to quit the program.
The program requires at least 1.2 MB of video RAM.
In addition to the front and back buffers, the program creates two off-screen surfaces and loads bitmaps into them. It calls the IDirectDrawSurface7::BltFast method to copy the contents of an off-screen surface to the back buffer, alternating the source surface on each frame. After it blits the bitmap to the back buffer, DDEx3 flips the front and back buffers.