Microsoft DirectX 8.1 (Visual Basic)

CONST_D3DWRAPBIAS

Defined to enable or disable texture wrapping based on the zero-based integer of a texture coordinate set.

Enum CONST_D3DWRAPBIAS
    D3DRENDERSTATE_WRAPBIAS = 128 (&H80)
End Enum

Constants

D3DRENDERSTATE_WRAPBIAS
Wrap bias. For implementation details, see Remarks.

Remarks

Microsoft® Direct3D® defines the D3DRENDERSTATE_WRAPBIAS constant as a convenience for applications to enable or disable texture wrapping based on the zero-based integer of a texture coordinate set (rather than explicitly using one of the D3DRS_WRAPn state values). Add the D3DRENDERSTATE_WRAPBIAS value to the zero-based index of a texture coordinate set to calculate the D3DRS_WRAPn value that corresponds to that index, as shown in the following example:

    On Local Error Resume Next
 
    ' Enable U/V wrapping for textures that use the texture
    ' coordinate set at the index within the lIndex variable.
    Call d3dDevice8.SetRenderState( _
            lIndex + D3DRENDERSTATE_WRAPBIAS, _
            D3DWRAPCOORD_0 Or D3DWRAPCOORD_1)
 
    ' If lIndex is 3, the value that results from
    ' the addition equates to D3DRENDERSTATE_WRAP3 (131).
    If Err.Number <> DD_OK Then
       ' Code to handle error goes here.
    End If

See Also

CONST_D3DRENDERSTATETYPE