ID3D10Device::CreatePixelShader method (d3d10.h)

Create a pixel shader.

Syntax

HRESULT CreatePixelShader(
  [in]  const void        *pShaderBytecode,
  [in]  SIZE_T            BytecodeLength,
  [out] ID3D10PixelShader **ppPixelShader
);

Parameters

[in] pShaderBytecode

Type: const void*

A pointer to the compiled shader. To get this pointer see Getting a Pointer to a Compiled Shader.

[in] BytecodeLength

Type: SIZE_T

Size of the compiled pixel shader.

[out] ppPixelShader

Type: ID3D10PixelShader**

Address of a pointer to an ID3D10PixelShader 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 10 Return Codes.

Remarks

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

Requirements

Requirement Value
Target Platform Windows
Header d3d10.h
Library D3D10.lib

See also

ID3D10Device Interface