D3DXCreateFragmentLinker

Create a fragment linker. This can be used to link one or more shader fragments together.

HRESULT D3DXCreateFragmentLinker(
  LPDIRECT3DDEVICE9 pDevice,
  UINT ShaderCacheSize,
  LPD3DXFRAGMENTLINKER * ppFragmentLinker
);

Parameters

pDevice
[in] Pointer to the current device. See IDirect3DDevice9.
ShaderCacheSize
[in] Shader cache size in bytes. This can be used for optimization.
ppFragmentLinker
[out] Returns a pointer to the new fragment linker interface. See ID3DXFragmentLinker.

Return Values

If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA, E_OUTOFMEMORY.

Remarks

Here is an example taken from the FragmentLinker Sample that creates a fragment linker:

ID3DXFragmentLinker* g_pFragmentLinker = NULL; 
IDirect3DDevice9*    pd3dDevice        = NULL;
    
    // Initialize the device before using it
    ...
    	
    // Create the fragment linker interface
    D3DXCreateFragmentLinker( pd3dDevice, 0, &g_pFragmentLinker );

Requirements

Header: Declared in D3dx9shader.h.