?/TD> |
Microsoft DirectX 9.0 |
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_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. D3DXERR_INVALIDDATA The data is invalid. E_OUTOFMEMORY Microsoft?Direct3D?could not allocate sufficient memory to complete the call.
Function Information
Header d3dx9shader.h Import library d3dx9.lib Minimum operating systems Windows 98