D3DVSD_REG
Binds a single vertex register to a vertex element from the vertex stream.
Function D3DVSD_REG(VertexRegister As Long, dataType As Long) As Long
D3DVSD_REG = (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAMDATA) Or _
((dataType) * 2 ^ D3DVSD_DATATYPESHIFT) Or (VertexRegister))
End Function
Parameters
- VertexRegister
- Address of the vertex register. Possible values range from 0 through 15. For the fixed function pipeline, the input registers have the following fixed mapping.
- D3DVSDE_POSITION
- Register 0.
- D3DVSDE_BLENDWEIGHT
- Register 1.
- D3DVSDE_NORMAL
- Register 2.
- D3DVSDE_PSIZE
- Register 3.
- D3DVSDE_DIFFUSE
- Register 4.
- D3DVSDE_SPECULAR
- Register 5.
- D3DVSDE_TEXCOORD0
- Register 6.
- D3DVSDE_TEXCOORD1
- Register 7.
- D3DVSDE_TEXCOORD2
- Register 8.
- D3DVSDE_TEXCOORD3
- Register 9.
- D3DVSDE_TEXCOORD4
- Register 10.
- D3DVSDE_TEXCOORD5
- Register 11.
- D3DVSDE_TEXCOORD6
- Register 12.
- D3DVSDE_TEXCOORD7
- Register 13.
- dataType
- Specifies the dimensionality and arithmetic data type. The following values are defined.
- D3DVSDT_D3DCOLOR
- 4-D packed unsigned bytes mapped to 0.0 to 1.0 range. In double word format this is ARGB, or in byte ordering it would be B, G, R, A.
- D3DVSDT_FLOAT1
- 1-D float expanded to (value, 0.0, 0.0, 1.0)
- D3DVSDT_FLOAT2
- 2-D float expanded to (value, value, 0.0, 1.0)
- D3DVSDT_FLOAT3
- 3-D float expanded to (value, value, value, 1.0)
- D3DVSDT_FLOAT4
- 4-D float.
- D3DVSDT_UBYTE4
- 4-D unsigned byte. In double word format this is ABGR, or in byte ordering it would be R, G, B, A.
Remarks
D3DVSD_REG and all the constants it uses are found in (SDK Root)\Samples\Multimedia\VBSamples\Common\D3DShaders.bas.
See Also
Direct3DDevice8.CreateVertexShader