ID3D11DeviceContext::HSSetSamplers Method

Set an array of sampler states to the hull-shader stage.

Syntax

void HSSetSamplers(
  [in]  UINT StartSlot,
  [in]  UINT NumSamplers,
  [in]  ID3D11SamplerState *const *ppSamplers
);

Parameter

  • StartSlot [in]
    Typ: UINT

    Index into the zero-based array to begin setting samplers to (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1).

  • NumSamplers [in]
    Typ: UINT

    Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot).

  • ppSamplers [in]
    Typ: ID3D11SamplerState*

    Pointer to an array of sampler-state interfaces (see ID3D11SamplerState). See Remarks.

Rückgabewert

Methode gibt keinen Wert zurück.

Hinweise

Any sampler may be set to NULL; this invokes the default state, which is defined to be the following.


//Default sampler state:
D3D11_SAMPLER_DESC SamplerDesc;
SamplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
SamplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
SamplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
SamplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
SamplerDesc.MipLODBias = 0;
SamplerDesc.MaxAnisotropy = 1;
SamplerDesc.ComparisonFunc = D3D11_COMPARISON_NEVER;
SamplerDesc.BorderColor[0] = 1.0f;
SamplerDesc.BorderColor[1] = 1.0f;
SamplerDesc.BorderColor[2] = 1.0f;
SamplerDesc.BorderColor[3] = 1.0f;
SamplerDesc.MinLOD = -FLT_MAX;
SamplerDesc.MaxLOD = FLT_MAX;
        

The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.

Anforderungen

Header

D3D11.h

Bibliothek

D3D11.lib

Siehe auch

ID3D11DeviceContext