ID3DX11EffectVariable::AsShaderResource method

Get a shader-resource variable.

Syntax

ID3DX11EffectShaderResourceVariable* AsShaderResource();

Parameters

This method has no parameters.

Return value

Type: ID3DX11EffectShaderResourceVariable*

A pointer to a shader-resource variable. See ID3DX11EffectShaderResourceVariable.

Remarks

AsShaderResource returns a version of the effect variable that has been specialized to a shader-resource variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain shader-resource data.

Applications can test the returned object for validity by calling IsValid.

Note

The DirectX SDK does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.

Requirements

Requirement Value
Header
D3dx11effect.h
Library
N/A (An Effects 11 library is available online as shared source.)

See also

ID3DX11EffectVariable