Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
DirectX Graphics
Direct3D 10
Programming Guide
Pipeline Stages
 Primitive Topologies (Direct3D 10)

  Switch on low bandwidth view
Primitive Topologies (Direct3D 10)
Bb205124.XDK_CHM_BANNER_left(en-us,VS.85).jpgBb205124.XDK_CHM_BANNER_right(en-us,VS.85).jpg

Primitive Topologies (Direct3D 10)

Direct3D 10 supports several primitive types (or topologies) that are represented by the D3D10_PRIMITIVE_TOPOLOGY enumerated type. These types define how vertices are interpreted and rendered by the pipeline. The following basic primitive types are supported:

For a visualization of each primitive type, see the diagram later in this topic in Winding Direction and Leading Vertex Positions.

The input-assembler stage reads data from vertex and index buffers, assembles the data into these primitives, and then sends the data to the remaining pipeline stages. (You can use the ID3D10Device::IASetPrimitiveTopology method to specify the primitive type for the input-assembler stage.)

Primitive Adjacency

All Direct3D 10 primitive types (except the point list) are available in two versions: one primitive type with adjacency and one primitive type without adjacency. Primitives with adjacency contain some of the surrounding vertices, while primitives without adjacency contain only the vertices of the target primitive. For example, the line list primitive (represented by the D3D10_PRIMITIVE_TOPOLOGY_LINELIST value) has a corresponding line list primitive that includes adjacency (represented by the D3D10_PRIMITIVE_TOPOLOGY_LINELIST_ADJ value.)

Adjacent primitives are intended to provide more information about your geometry and are only visible through a geometry shader. Adjacency is useful for geometry shaders that use silhouette detection, shadow volume extrusion, and so on.

For example, suppose you want to draw a triangle list with adjacency. A triangle list that contains 36 vertices (with adjacency) will yield 6 completed primitives. Primitives with adjacency (except line strips) contain exactly twice as many vertices as the equivalent primitive without adjacency, where each additional vertex is an adjacent vertex.

Winding Direction and Leading Vertex Positions

As shown in the following figure, a leading vertex is the first non-adjacent vertex in a primitive. A primitive type can have multiple leading vertices defined, as long as each one is used for a different primitive. For a triangle strip with adjacency, the leading vertices are 0, 2, 4, 6, and so on. For a line strip with adjacency, the leading vertices are 1, 2, 3, and so on. An adjacent primitive, on the other hand, has no leading vertex.

The following diagram illustrates the vertex ordering for all of the primitive types that the input assembler can produce.

Bb205124.d3d10_primitive_topologies(en-us,VS.85).png

The symbols in the figure are described in the following table.

SymbolNameDescription
Bb205124.d3d10_primitive_topologies_vertex(en-us,VS.85).pngVertexA point in 3D space.
Bb205124.d3d10_primitive_topologies_winding_direction(en-us,VS.85).pngWinding DirectionThe vertex order when assembling a primitive. Can be clockwise or counterclockwise; specify this by calling ID3D10Device::CreateRasterizerState.
Bb205124.d3d10_primitive_topologies_leading_vertex(en-us,VS.85).pngLeading VertexThe first non-adjacent vertex in a primitive that contains per-constant data.

See Also

Pipeline Stages (Direct3D 10)

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker