57
57
58
58
@interface CCEffectHue ()
59
59
#if CCEFFECTHUE_USES_COLOR_MATRIX
60
- @property (nonatomic ) GLKMatrix4 hueRotationMtx;
60
+ @property (nonatomic ) NSValue * hueRotationMtx;
61
61
#else
62
- @property (nonatomic ) float conditionedHue;
62
+ @property (nonatomic ) NSNumber * conditionedHue;
63
63
#endif
64
64
@end
65
65
@@ -85,9 +85,9 @@ -(id)initWithHue:(float)hue
85
85
{
86
86
_hue = hue;
87
87
#if CCEFFECTHUE_USES_COLOR_MATRIX
88
- _hueRotationMtx = matrixWithHue (conditionHue (hue));
88
+ _hueRotationMtx = [ NSValue valueWithGLKMatrix4: matrixWithHue (conditionHue (hue))] ;
89
89
#else
90
- _conditionedHue = conditionHue (hue);
90
+ _conditionedHue = [ NSNumber numberWithFloat: conditionHue (hue)] ;
91
91
#endif
92
92
self.debugName = @" CCEffectHue" ;
93
93
}
@@ -164,9 +164,9 @@ -(void)buildRenderPasses
164
164
pass.shaderUniforms [CCShaderUniformMainTexture] = previousPassTexture;
165
165
pass.shaderUniforms [CCShaderUniformPreviousPassTexture] = previousPassTexture;
166
166
#if CCEFFECTHUE_USES_COLOR_MATRIX
167
- pass.shaderUniforms [weakSelf.uniformTranslationTable[@" u_hueRotationMtx" ]] = [ NSValue valueWithGLKMatrix4: weakSelf.hueRotationMtx] ;
167
+ pass.shaderUniforms [weakSelf.uniformTranslationTable[@" u_hueRotationMtx" ]] = weakSelf.hueRotationMtx ;
168
168
#else
169
- pass.shaderUniforms [weakSelf.uniformTranslationTable[@" u_hue" ]] = [ NSNumber numberWithFloat: weakSelf.conditionedHue] ;
169
+ pass.shaderUniforms [weakSelf.uniformTranslationTable[@" u_hue" ]] = weakSelf.conditionedHue ;
170
170
#endif
171
171
} copy]];
172
172
@@ -177,9 +177,9 @@ -(void)setHue:(float)hue
177
177
{
178
178
_hue = hue;
179
179
#if CCEFFECTHUE_USES_COLOR_MATRIX
180
- _hueRotationMtx = matrixWithHue (conditionHue (hue));
180
+ _hueRotationMtx = [ NSValue valueWithGLKMatrix4: matrixWithHue (conditionHue (hue))] ;
181
181
#else
182
- _conditionedHue = conditionHue (hue);
182
+ _conditionedHue = [ NSNumber numberWithFloat: conditionHue (hue)] ;
183
183
#endif
184
184
}
185
185
0 commit comments