public:
HRESULT CreatePixelShader(
const void *pShaderBytecode,
SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11PixelShader **ppPixelShader
)
pShaderBytecode
Type: void *
[in] A pointer to the compiled shader.
BytecodeLength
Type: SIZE_T
[in] Size of the compiled pixel shader.
pClassLinkage
Type: ID3D11ClassLinkage *
[in, optional] A pointer to a class linkage interface (see ID3D11ClassLinkage); the value can be NULL.
ppPixelShader
Type: ID3D11PixelShader **
[out, optional] 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.
Type: HRESULT
This method returns one of the following Direct3D 11 return codes.
After creating the pixel shader, you can set it to the device using ID3D11DeviceContext::PSSetShader.
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).