?/TD>
Microsoft DirectX 9.0

D3DXGetShaderSamplers Function


Get the sampler names referenced in a shader.

Syntax

HRESULT WINAPI D3DXGetShaderSamplers(      

    CONST DWORD* pFunction,     LPCSTR* pSamplers,     UINT* pCount );

Parameters

pFunction
[in] Pointer to the shader function DWORD stream.
pSamplers
[in, out] Pointer to an array of LPCSTRs. The function will fill this array with pointers to the sampler names contained within pFunction. The maximum array size is the maximum number of sampler registers (16 for vs_3_0 and ps_3_0).

To find the number of samplers used, check pCount after calling D3DXGetShaderSamplers with pSamplers = NULL.

pCount
[out] Returns the number of samplers referenced by the shader.

Return Value

If the function succeeds, the return value is D3D_OK.

If the function fails, the return value can be one of the following values.

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
D3DXERR_INVALIDDATAThe data is invalid.
E_OUTOFMEMORYMicrosoft?Direct3D?could not allocate sufficient memory to complete the call.


Function Information

Headerd3dx9shader.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98


© 2002 Microsoft Corporation. All rights reserved.