Partager via


Clamp Texture Address Mode

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

The clamp texture address mode, identified by the D3DMTADDRESS_CLAMP member of the D3DMTEXTUREADDRESS enumerated type, causes Microsoft® Direct3D® Mobile to clamp your texture coordinates to the [0.0, 1.0] range. That is, it applies the texture once, then smears the color of edge pixels. For example, suppose that your application creates a square primitive and assigns texture coordinates of (0.0,0.0), (0.0,3.0), (3.0,3.0), and (3.0,0.0) to the primitive's vertices. Setting the texture addressing mode to D3DMTADDRESS_CLAMP results in the texture being applied once. The pixel colors at the top of the columns and the end of the rows are extended to the top and right of the primitive respectively.

This is shown in the following illustration.

Aa911203.e87f37ae-c462-4df7-bf92-143147bbe47b(en-us,MSDN.10).gif

See Also

Concepts

Texture Addressing Modes