DeclarationMethod Enumeration

Language:

Defines the declaration methods for a vertex declaration.

Definition

Visual Basic Public Enum DeclarationMethod
C# public enum DeclarationMethod
C++ public enum class DeclarationMethod
JScript public enum DeclarationMethod

Members

Member Value Description
LookUpPresampled 6 Looks up a pre-sampled displacement map. The input type must be set to Unused, and the stream index and stream offset must be set to 0. The output type for this operation is always Float1. The device must support displacement mapping. This constant is supported only by the programmable pipeline on N-patch data, if N-patches are enabled.
LookUp 5 Looks up a displacement map. The input type can be Float2, Float3, or Float4. Only the .x and .y components are used for the texture map lookup. The output type is always Float1. The device must support displacement mapping. This constant is supported only by the programmable pipeline on N-patch data, if N-patches are enabled.
UV 4 Copies out the u and v values at a point on the rectangle or triangle patch. This results in a 2-D float. The input type must be set to Unused; the output type is always Float2. The input stream and offset also are unused, but must be set to 0.
CrossUv 3 Computes the normal at a point on the rectangle or triangle patch as the cross product of the two tangents. The input type can be any of the DeclarationType float values, Color, Ubyte4, or Short4. The output type is always Float3.
PartialV 2 Computes the tangent at a point on the rectangle or triangle patch in the v direction. The input type can be Float3, Float4, Color, Ubyte4, or Short4. The output type is always Float3.
PartialU 1 Computes the tangent at a point on the rectangle or triangle patch in the u direction. The input type can be Float3, Float4, Color, Ubyte4, or Short4. The output type is always Float3.
Default 0 Default value. The tessellator copies the vertex data (or the spline data if it is operating on a patch) without performing additional calculations on it. The input and output types can be any value. When the tessellator is used, this element is interpolated; otherwise, vertex data is copied into the input register.

Remarks

The VertexElement structure uses DeclarationMethod values to determine which vertex data to calculate during tessellation. These values can be passed into the constructor or to the DeclarationMethod property. Mesh data should use the default value. Patches can use any of the other implemented types.

Vertex data is declared with an array of VertexElement structures. Each element in the array contains a vertex declaration method.

In addition to using Default, a normal mesh can use LookUp and LookUpPresampled when N-patches are enabled.

Enumeration Information

Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3D (microsoft.directx.direct3d.dll)
Strong Name Microsoft.DirectX.Direct3D,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492

Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center