Permalink
Browse files

Merge pull request #1287 from aburgel/ios_64bit_fixes

Fix 64bit string formatting issues on iOS
  • Loading branch information...
2 parents 74c9e66 + 4918329 commit 39a9b563b23f087ca374779ac6dbe66b984c4b39 @BradLarson committed Nov 4, 2013
@@ -66,11 +66,11 @@ + (NSString *)fragmentShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigm
uniform highp float texelWidthOffset;\n\
uniform highp float texelHeightOffset;\n\
\n\
- varying highp vec2 blurCoordinates[%d];\n\
+ varying highp vec2 blurCoordinates[%lu];\n\
\n\
void main()\n\
{\n\
- lowp vec4 sum = vec4(0.0);\n", 1 + (numberOfOptimizedOffsets * 2) ];
+ lowp vec4 sum = vec4(0.0);\n", (unsigned long)(1 + (numberOfOptimizedOffsets * 2)) ];
#else
[shaderString appendFormat:@"\
uniform sampler2D inputImageTexture;\n\
@@ -116,11 +116,11 @@ + (NSString *)fragmentShaderForStandardBlurOfRadius:(NSUInteger)blurRadius sigma
[shaderString appendFormat:@"\
uniform sampler2D inputImageTexture;\n\
\n\
- varying highp vec2 blurCoordinates[%d];\n\
+ varying highp vec2 blurCoordinates[%lu];\n\
\n\
void main()\n\
{\n\
- lowp vec4 sum = vec4(0.0);\n", (blurRadius * 2 + 1) ];
+ lowp vec4 sum = vec4(0.0);\n", (unsigned long)(blurRadius * 2 + 1) ];
#else
[shaderString appendFormat:@"\
uniform sampler2D inputImageTexture;\n\
@@ -274,11 +274,11 @@ + (NSString *)fragmentShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigm
uniform highp float texelWidthOffset;\n\
uniform highp float texelHeightOffset;\n\
\n\
- varying highp vec2 blurCoordinates[%d];\n\
+ varying highp vec2 blurCoordinates[%lu];\n\
\n\
void main()\n\
{\n\
- lowp vec4 sum = vec4(0.0);\n", 1 + (numberOfOptimizedOffsets * 2) ];
+ lowp vec4 sum = vec4(0.0);\n", (unsigned long)(1 + (numberOfOptimizedOffsets * 2)) ];
#else
[shaderString appendFormat:@"\
uniform sampler2D inputImageTexture;\n\
@@ -121,11 +121,11 @@ + (NSString *)fragmentShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigm
uniform highp float texelWidthOffset;\n\
uniform highp float texelHeightOffset;\n\
\n\
- varying highp vec2 blurCoordinates[%d];\n\
+ varying highp vec2 blurCoordinates[%lu];\n\
\n\
void main()\n\
{\n\
- lowp float sum = 0.0;\n", 1 + (numberOfOptimizedOffsets * 2) ];
+ lowp float sum = 0.0;\n", (unsigned long)(1 + (numberOfOptimizedOffsets * 2)) ];
#else
[shaderString appendFormat:@"\
uniform sampler2D inputImageTexture;\n\

0 comments on commit 39a9b56

Please sign in to comment.