Microsoft DirectX 9.0

ID3DXFragmentLinker::LinkVertexShader Method

Link a compiled vertex shader at runtime. This is a very lightweight operation.


HRESULT LinkVertexShader(      

    LPCSTR Target,     DWORD Flags,     LPD3DXHANDLE rgFragmentHandles,     UINT cFragments,     LPDIRECT3DVERTEXSHADER9* pVShader,     LPD3DXBUFFER *ppErrorMsgs );


[in] Vertex shader compile target. A compile target consists of the type of shader and the shader version number. Valid targets are vs_1_1, vs_2_0, vs_2_x and vs_2_sw.
[in] Link options. See D3DXSHADER.
[in] Unique identifier to the fragments. See Handles.
[in] Number of fragments to be linked.
[out] Pointer to a vertex shader. See IDirect3DVertexShader9.
[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 values.

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.

© 2002 Microsoft Corporation. All rights reserved.