Routines (alphabetical) > Object Classes > Graphics Object Classes > IDLgrShader::GetUniformVariable

# IDLgrShader::GetUniformVariable

The IDLgrShader::GetUniformVariable procedure method returns the value of a named uniform variable. A uniform variable provides a way to pass small amounts of data to a shader program. It can enable interactivity by linking user interface control changes to program updates.

The GetUniformVariable method is typically called inside the IDLgrShader::Filter method, which is used to provide a software-based alternative to a hardware-based image processing shader program. See Examples for such a sample program.

## Syntax

Obj->[IDLgrShader::]GetUniformVariable, Name, Value

## Arguments

### Name

Specifies a case-sensitive string name of the uniform variable to retrieve.

Note: If the Name argument specifies a uniform variable that was never defined and stored in the shader object using SetUniformVariable, then the variable specified in the Value parameter will be set to an undefined variable.

### Value

Specifies a variable that contains the current value of the uniform variable. The variable is stored in this parameter in exactly the same format as that used when it was defined using IDLgrShader::SetUniformVariable.

## Keywords

None.

## Version History

6.4 | Introduced

## See Also

IDLgrShader::SetUniformVariable