d3d9.dllLinkPixelShader
Microsoft DirectX 9.0 SDK Update (October 2004)

ID3DXFragmentLinker::LinkPixelShader Method


Link a compiled pixel shader at run time. This is a very lightweight operation.

Syntax

HRESULT LinkPixelShader(      

    LPCSTR pProfile,     DWORD Flags,     CONST D3DXHANDLE *rgFragmentHandles,     UINT cFragments,     LPDIRECT3DPIXELSHADER9 *pPShader,     LPD3DXBUFFER *ppErrorMsgs );

Parameters

pProfile
[in] Pointer to a pixel shader profile which detemines the shader instruction set. See D3DXGetPixelShaderProfile for a list of the profiles available.
Flags
[in] Link options. See D3DXSHADER Compile Options.
rgFragmentHandles
[in] An array of pixel shader fragment handles. See Handles.
cFragments
[in] Number of fragments to be linked.
pPShader
[out] Pointer to a pixel shader. See IDirect3DPixelShader9.
ppErrorMsgs
[out, retval] Buffer containing at least the first compile error message that occurred. This includes effect compiler errors and high-level language compile errors. For more information about accessing the buffer, see ID3DXBuffer.

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following:

E_FAILAn undetermined error occurred inside the Microsoft Direct3D subsystem.
D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
D3DXERR_INVALIDDATAThe data is invalid.
E_OUTOFMEMORYDirect3D could not allocate sufficient memory to complete the call.




© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.