ID3DX11Effect::GetVariableByIndex method

Get a variable by index.

Syntax

ID3DX11EffectVariable* GetVariableByIndex(
   UINT Index
);

Parameters

Index

Type: UINT

A zero-based index.

Return value

Type: ID3DX11EffectVariable*

A pointer to a ID3DX11EffectVariable.

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 any local non-static effect variable using its name or with an index.

The method returns a pointer to an effect-variable interface if a variable is not found; you can call ID3DX11Effect::IsValid to verify whether or not the index 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