Instance Method

objectForKeyedSubscript:

Returns the value associated with the specified GLSL uniform variable or attribute name, using subscript syntax.

Declaration

- (id)objectForKeyedSubscript:(id)key;

Parameters

key

A shader variable or attribute name used in one of the technique’s shader programs.

Return Value

An object containing the value of the shader symbol.

Discussion

This method returns an object appropriate to the type of the shader symbol being set. For example, retrieving the value of a float uniform variable returns an NSNumber object, and retrieving the value of a GLSL vec3 uniform variable or Metal float3 variable returns an NSValue object containing an SCNVector3 structure.

See Also

Handling Parameters for a Technique’s Shader Programs

- handleBindingOfSymbol:usingBlock:

Specifies a block to be called before rendering using programs with the specified GLSL uniform variable or attribute name.

- setObject:forKeyedSubscript:

Sets a value for the specified shader variable or attribute name, using subscript syntax.