DirectX SDK

Step 1: Initialize the Scene Geometry

[Visual Basic]

The information in this section pertains only to applications written in C and C++. See Direct3D Immediate Mode Visual Basic Tutorials.

[C++]

This tutorial prepares the geometry for the primitives in the application-defined App_InitDeviceObjects method. App_InitDeviceObjects defines a series of vertices for each object; retaining each primitive's vertex information in globally defined data structures. Vertex information is used by the DrawPrimitive Methods during rendering.

Technically, you are not required to set up the geometry at this time—you can do it anytime prior to calling the rendering methods.

For more information on primitive types, see Primitive Types.

For more information on specifying vertices in Direct3D, see Vertex Formats.

Note  The order in which the geometry is prepared for specific primitives does not effect the layout of objects in your scene.