DirectX SDK |
Direct3D offers several methods to render primitives and indexed primitives in a single call. All rendering methods in the IDirect3DDevice7 interface accept a combination of flexible vertex format flags that describe the vertex type your application uses; these flags also determine which parts of the geometry pipeline the system will apply. (This differs from the version of the methods in the IDirect3DDevice2, which accept only the concrete vertex formats identified by members of the D3DPRIMITIVETYPE enumeration.) For more information about these descriptors, see Vertex Formats.
The DrawPrimitive family of rendering methods offers the following rendering methods, organized into the following groups:
When you render a primitive, the associated methods accept parameters that describe the type of primitive being rendered (such as a triangle strip, a triangle list, or another primitive type), the vertex format, rendering behavior flags, and vertex information. These flags and their effects are documented in the references for the rendering methods.
Note that the number of vertices you need to provide for the methods depends on the type of primitive you are rendering. For instance, if you're rendering a line list, you must provide at least two vertices to define a single line, and the total number must be an even value. Likewise for a triangle list, you must include at least three vertices, with the total evenly divisible by three. For information about vertex counts for other types of primitives, see Primitive Types and D3DPRIMITIVETYPE.
Vertex buffers, and the methods to render from them, provide performance and ease-of-use enhancements that improve upon rendering vertices from your own data structures. For more information, see Vertex Buffers.
Direct3D offers Visual Basic applications several methods to render primitives in a single call. All rendering methods in the Direct3DDevice7 class accept a combination of flexible vertex format flags that describe the vertex type your application uses; these flags also determine which parts of the geometry pipeline the system will apply. For more information about these descriptors, see Vertex Formats.
The DrawPrimitive family of rendering methods offers the following rendering methods, organized into the following groups:
When you render a primitive, the associated methods accept parameters that describe the type of primitive being rendered (such as a triangle strip, a triangle list, or another primitive type), the vertex format, rendering behavior flags, and vertex information. These flags and their effects are documented in the references for the rendering methods.
Note that the number of vertices you need to provide for the methods depends on the type of primitive you are rendering. For instance, if you're rendering a line list, you must provide at least two vertices to define a single line, and the total number must be an even value. Likewise for a triangle list, you must include at least three vertices, with the total evenly divisible by three. For information about vertex counts for other types of primitives, see Primitive Types and CONST_D3DPRIMITIVETYPE.
Vertex buffers, and the methods to render from them, provide performance and ease-of-use enhancements that improve upon rendering vertices from your own data structures. For more information, see Vertex Buffers.
Note DirectX for Visual Basic does not support rendering strided vertices.