Graphics Reference
In-Depth Information
by the indices in the index buffer. The determination of which order is used comes from
the type of draw call used to invoke pipeline execution. Regardless of where the order-
ing comes from, the input assembler produces a stream of vertices to represent the input
geometry.
Primitive Streams
The vertex stream is further refined into a stream of primitives. Various portions of the
pipeline are intended to operate on only vertices (vertex shader), on both vertices and
primitives (hull shader and domain shader), or only on complete primitives (geometry
shader). In each of these cases, the stream of primitives is shaped by the selected primitive
topology and the type of draw call used to initiate pipeline execution.
Draw Call Effects
So how exactly are the vertex and primitive streams that result from a draw call influenced
by the type of call used? This can best be demonstrated by examining the output from the
input assembler for each of the types of draw calls. The following sections provide infor-
mation about each of the classes of draw calls, and what effects they have on the resulting
data streams.
Standard draw methods. The simplest draw methods to consider are the Draw() and
DrawAuto () methods. Both of these methods trigger the input assembler to assemble verti-
ces based on its input layout settings. This creates a stream of vertices, which is then passed
into the pipeline. The primitive information generated by these draw calls is determined by
the primitive topology currently specified in the input assembler, and the construction of
primitives is dependent on the order of the vertices found in the vertex buffers. This process
can be considered the basic vertex and primitive construction process.
Indexed draw methods. The first variation on the basic draw calls is the addition of
indexed rendering. As we have already discussed, indexed rendering uses the indices of
an index buffer to determine which vertices are used to construct primitives instead of sim-
ply using the vertex order from the vertex buffers. The vertex stream remains unchanged,
with the exception that the vertices within it are chosen by the indices of the index buffer.
In addition, the primitive stream creates its primitives with the index buffer ordering, in-
stead of the vertex buffer ordering. Several draw calls support indexed rendering, including
DrawIndexed(), DrawIndexedlnstanced(), and DrawIndexedlnstancedlndirect().
Instanced draw methods. In addition to indexed rendering, Direct3D 11 also allows
instanced rendering. We discussed instanced rendering briefly while describing the
available members of the D3D11_INPUT_ELEMENT_DESC structure. If a vertex component is
declared as a per-instance component, and the pipeline is invoked with one of the instanced
Search WWH ::




Custom Search