Graphics Reference
In-Depth Information
D3Dll_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST,
D3Dll_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST,
D3Dll_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST,
D3Dll_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST,
D3Dll_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_T0P0L0GY_24_C0NTR0L_P0INT_PATCHLIST,
D3Dll_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST,
D3Dll_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST,
D3Dll_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST,
D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST,
D3Dll_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST
}
// Specify the type of geometry that we will be dealing with.
m_pContext->IASetPrimitiveTopology( primType );
Listing 3.6. The available primitive topology types, and an example of how to set the topology type with
the device context interface.
As you can see from Listing 3.6, there are quite a variety of available primitive types.
The first nine entries in the list should look familiar if you have used Direct3D 10 before,
since they have been in use prior to Direct3D 11. However, the remainder of the list pro-
vides a series of different control point patch lists, each with a different number of points to
be included in the control patch, up to a maximum of 32. These primitive types have been
introduced to support the new tessellation stages that were introduced in Direct3D 11. To
better understand how all of these primitive topologies organize a stream of vertices, we
will create an example with an ordered series of vertices and then examine how each topol-
ogy type would create primitives with this vertex stream. Figure 3.6 shows the sample set
of vertices, each numbered according to its location in the vertex stream.
Point primitives. The point list primitive topology is the simplest of all of the primi-
tive types. Vertices are grouped into single-vertex primitives, meaning that the stream
of vertices produces an equal-sized stream of primitives. Therefore, the output group of
primitives will look identical to that shown in Figure 3.6.
Line primitives. The line list primitive topology is only slightly more complex, with every
pair of vertices producing a line primitive. This essentially indicates that the two vertices
comprising a line must be included in the vertex buffer for every line to be rendered. The
line strip primitive topology provides a more compact representation of the line primitives,
Search WWH ::




Custom Search