Direct3D 11 Graphics API Reference - Constants

This section provides a comprehensive list of constants used in the Direct3D 11 Graphics API. These constants define various states, flags, and identifiers essential for configuring and interacting with the Direct3D 11 rendering pipeline.

Commonly Used Constants

D3D11_COMPARISON_FUNC Enumeration

Specifies comparison options for depth, stencil, and texture sampling operations.

Name Description
D3D11_COMPARISON_NEVER Never pass.
D3D11_COMPARISON_LESS Pass if the source is less than the destination.
D3D11_COMPARISON_EQUAL Pass if the source is equal to the destination.
D3D11_COMPARISON_LESS_EQUAL Pass if the source is less than or equal to the destination.
D3D11_COMPARISON_GREATER Pass if the source is greater than the destination.
D3D11_COMPARISON_NOT_EQUAL Pass if the source is not equal to the destination.
D3D11_COMPARISON_GREATER_EQUAL Pass if the source is greater than or equal to the destination.
D3D11_COMPARISON_ALWAYS Always pass.

D3D11_STENCIL_OP Enumeration

Specifies stencil buffer operations.

Name Description
D3D11_STENCIL_OP_KEEP Keep the current stencil buffer value.
D3D11_STENCIL_OP_ZERO Set the stencil buffer value to 0.
D3D11_STENCIL_OP_REPLACE Replace the stencil buffer value with the reference value.
D3D11_STENCIL_OP_INCR_SAT Increment the stencil buffer value, clamping at the maximum value.
D3D11_STENCIL_OP_DECR_SAT Decrement the stencil buffer value, clamping at 0.
D3D11_STENCIL_OP_INVERT Invert the stencil buffer value.
D3D11_STENCIL_OP_INCR Increment the stencil buffer value.
D3D11_STENCIL_OP_DECR Decrement the stencil buffer value.

D3D11_FILL_MODE Enumeration

Specifies fill modes for rasterization.

Name Description
D3D11_FILL_WIREFRAME Render primitives as wireframes.
D3D11_FILL_SOLID Render primitives as solid surfaces.

D3D11_PRIMITIVE_TOPOLOGY Enumeration

Specifies the primitive type.

Name Description
D3D11_PRIMITIVE_TOPOLOGY_POINTLIST A list of points.
D3D11_PRIMITIVE_TOPOLOGY_LINELIST A list of lines.
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST A list of triangles.
D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ A list of lines with adjacency information.
D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ A list of triangles with adjacency information.

Other Important Constants

Note on Flags

Many Direct3D 11 functions accept flags that are combined using the bitwise OR operator (|). For example, when creating a texture, you might use flags like D3D11_BIND_SHADER_RESOURCE and D3D11_BIND_RENDER_TARGET simultaneously.

D3D11_BIND_FLAG Enumeration

Specifies how a resource will be used.

D3D11_USAGE Enumeration

Specifies memory usage and access patterns for resources.

D3D11_CPU_ACCESS_FLAG Enumeration

Specifies CPU read/write access to resources.

D3D11_MAP Enumeration

Specifies how to map a resource.

Tip

For a complete and exhaustive list of all constants, please refer to the official DirectX SDK documentation (if available in this archive context).