Microsoft DirectX 8.1 (Visual Basic) |
The Donuts sample illustrates how to use Microsoft® Direct3D® to create a two-dimensional sprite engine.
Source: (SDK root)\Samples\Multimedia\VBSamples\Direct3D\Donuts
Executable: (SDK root)\Samples\Multimedia\VBSamples\Direct3D\Bin
The following table lists the keys that are implemented.
Key | Action |
---|---|
ALT+ENTER | Toggles between full-screen and windowed modes. |
ESC | Exits the application. |
The background is rendered with two TLVertex (screen space) triangles. The sprites are defined as an array of user-defined type that is a container for sprite properties such as position, direction, speed, and size. Each sprite is rendered as two TLVertex triangles in each frame.
This sample uses common Microsoft DirectX® code that consists of programming elements such as helper functions. This code is shared with other samples on the DirectX SDK. You can find the common source code in (SDK root)\Samples\Multimedia\VBSamples.