ID3DX11Effect::GetVariableByName method

Get a variable by name.

Syntax

ID3DX11EffectVariable* GetVariableByName(
   LPCSTR Name
);

Parameters

Name

Type: LPCSTR

The variable name.

Return value

Type: ID3DX11EffectVariable*

A pointer to an ID3DX11EffectVariable. Returns an invalid variable if the specified name cannot be found.

Remarks

An effect may contain one or more variables. Variables outside of a technique are considered global to all effects, those located inside of a technique are local to that technique. You can access an effect variable using its name or with an index.

The method returns a pointer to an effect-variable interface whether or not a variable is found. ID3DX11Effect::IsValid should be called to verify whether or not the name exists.

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

ID3DX11Effect