ID3D11Device::CreateSamplerState Method

Create a sampler-state object that encapsulates sampling information for a texture.

Syntax

public:
HRESULT CreateSamplerState(
         const D3D11_SAMPLER_DESC *pSamplerDesc,
         ID3D11SamplerState **ppSamplerState
)  

Parameters

pSamplerDesc
Type: D3D11_SAMPLER_DESC *

[in] Pointer to a sampler state description (see D3D11_SAMPLER_DESC).

ppSamplerState
Type: ID3D11SamplerState **

[out, optional] Address of a pointer to the sampler state object created (see ID3D11SamplerState).

Return value

Type: HRESULT 

This method returns one of the following Direct3D 11 return codes.

Remarks

4096 unique sampler state objects can be created on a device at a time.

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).

See also

ID3D11Device

ID3D11Device Members