Microsoft DirectX 8.1 (Visual Basic)

Tutorial 2: Rendering Vertices

Applications written in Microsoft® Direct3D® use vertices to draw geometric shapes. Each 3-D scene inclides one or more of these geometric shapes. The Vertices sample project creates the simplest shape, a triangle, and renders it to the display. This tutorial covers how to select a custom vertex type, set up a vertex buffer, and render vertices to the display.

This tutorial shows how to use vertices to create a triangle with the following steps:

Note  The path of the Vertices sample project is:

    (SDK root)\Samples\Multimedia\VBSamples\Direct3D\Tutorials\Tut01_Vertices.

The code in the Vertices sample project is nearly identical to the code in CreateDevice sample project. This tutorial focuses only on the code unique to vertices and does not cover initializing Direct3D, rendering, or shutting down. For information on these tasks, see Tutorial 1: Creating a Device