Inherits from CC3GLSLUniform : CC3GLSLVariable : NSObject
Declared in CC3GLSLVariable.h

Overview

Instances of this class are held in the CC3ShaderContext to allow the value of a uniform to be set directly by the application, on a node-by-node basis, to override the value retrieved automatically from the scene via the semantic context of the uniform variable.

An instance of this class does not set the state of the GL engine directly. Instead, it sets the value of the actual uniform within the program and pure color program that it overrides.

Class Methods

uniformOverrideForProgramUniform:andPureColorProgramUniform:

Allocates and initializes an instance to override the specified uniform, plus the specified uniform in the related pure color program.

+ (id)uniformOverrideForProgramUniform:(CC3GLSLUniform *)uniform andPureColorProgramUniform:(CC3GLSLUniform *)pureColorUniform

Discussion

The uniform parameter must not be nil. However, in many cases, the pureColorUniform parameter can and will be nil.

Declared In

CC3GLSLVariable.h

Instance Methods

initForProgramUniform:andPureColorProgramUniform:

Initializes this instance to override the specified uniform, plus the specified uniform in the related pure color program.

- (id)initForProgramUniform:(CC3GLSLUniform *)uniform andPureColorProgramUniform:(CC3GLSLUniform *)pureColorUniform

Discussion

The uniform parameter must not be nil. However, in many cases, the pureColorUniform parameter can and will be nil.

Declared In

CC3GLSLVariable.h

updateIfOverriding:

If this instance is overriding the specified uniform, either from the program or the pure color program, the value of the specified uniform is updated from the value of this instance.

- (BOOL)updateIfOverriding:(CC3GLSLUniform *)uniform

Discussion

Returns whether the value of the specified uniform was updated.

Declared In

CC3GLSLVariable.h