Freigeben über


ID3D11DeviceContext::PSSetShader Method

Sets a pixel shader to the device.

Syntax

void PSSetShader(
  [in]  ID3D11PixelShader *pPixelShader,
  [in]  ID3D11ClassInstance *const *ppClassInstances,
  [in]  UINT NumClassInstances
);

Parameter

  • pPixelShader [in]
    Typ: ID3D11PixelShader*

    Pointer to a pixel shader (see ID3D11PixelShader). Passing in NULL disables the shader for this pipeline stage.

  • ppClassInstances [in]
    Typ: ID3D11ClassInstance*

    A pointer to an array of class-instance interfaces (see ID3D11ClassInstance). Each interface used by a shader must have a corresponding class instance or the shader will get disabled. Set ppClassInstances to NULL if the shader does not use any interfaces.

  • NumClassInstances [in]
    Typ: UINT

    The number of class-instance interfaces in the array.

Rückgabewert

Methode gibt keinen Wert zurück.

Hinweise

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

The maximum number of instances a shader can have is 256.

Set ppClassInstances to NULL if no interfaces are used in the shader. If it is not NULL, the number of class instances must match the number of interfaces used in the shader. Furthermore, each interface pointer must have a corresponding class instance or the assigned shader will be disabled.

Anforderungen

Header

D3D11.h

Bibliothek

D3D11.lib

Siehe auch

ID3D11DeviceContext