Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID3D11Device::CreatePixelShader method

Create a pixel shader.

Syntax


HRESULT CreatePixelShader(
  [in]            const void               *pShaderBytecode,
  [in]                  SIZE_T             BytecodeLength,
  [in, optional]        ID3D11ClassLinkage *pClassLinkage,
  [out, optional]       ID3D11PixelShader  **ppPixelShader
);

Parameters

pShaderBytecode [in]

Type: const void*

A pointer to the compiled shader.

BytecodeLength [in]

Type: SIZE_T

Size of the compiled pixel shader.

pClassLinkage [in, optional]

Type: ID3D11ClassLinkage*

A pointer to a class linkage interface (see ID3D11ClassLinkage); the value can be NULL.

ppPixelShader [out, optional]

Type: ID3D11PixelShader**

Address of a pointer to a ID3D11PixelShader interface. If this is NULL, all other parameters will be validated, and if all parameters pass validation this API will return S_FALSE instead of S_OK.

Return value

Type: HRESULT

This method returns one of the following Direct3D 11 Return Codes.

Remarks

After creating the pixel shader, you can set it to the device using ID3D11DeviceContext::PSSetShader.

Requirements

Header

D3D11.h

Library

D3D11.lib

See also

ID3D11Device

 

 

Show:
© 2017 Microsoft