#import <CC3GLSLVariable.h>
Class Methods | |
(id) | + uniformOverrideForProgramUniform:andPureColorProgramUniform: |
Additional Inherited Members | |
Properties inherited from CC3GLSLUniform | |
GLenum | type |
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.
- (id) initForProgramUniform: | (CC3GLSLUniform *) | uniform | |
andPureColorProgramUniform: | (CC3GLSLUniform *) | pureColorUniform | |
Initializes this instance to override the specified uniform, plus the specified uniform in the related pure color program.
The uniform parameter must not be nil. However, in many cases, the pureColorUniform parameter can and will be nil.
+ (id) uniformOverrideForProgramUniform: | (CC3GLSLUniform *) | uniform | |
andPureColorProgramUniform: | (CC3GLSLUniform *) | pureColorUniform | |
Allocates and initializes an instance to override the specified uniform, plus the specified uniform in the related pure color program.
The uniform parameter must not be nil. However, in many cases, the pureColorUniform parameter can and will be nil.
- (BOOL) updateIfOverriding: | (CC3GLSLUniform *) | uniform |
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.
Returns whether the value of the specified uniform was updated.