cocos2d-iphone-classic
cocos2d-iphone-classic copied to clipboard
Support Xcode7/iOS9
I know that development has stopped, but it would be nice if we could keep our old apps running on the new iOS versions as long as possible. I converted the apps to 64bit, but now I get an error when I start the app with Xcode7/iOS9.
2015-09-22 09:22:49.353 WeeSubs[713:314073] cocos2d: ERROR: Failed to compile shader:
precision mediump float;
uniform mat4 CC_PMatrix;
uniform mat4 CC_MVMatrix;
uniform mat4 CC_MVPMatrix;
uniform vec4 CC_Time;
uniform vec4 CC_SinTime;
uniform vec4 CC_CosTime;
uniform vec4 CC_Random01;
//CC INCLUDES END
#extension GL_OES_standard_derivatives : enable
#ifdef GL_ES
varying mediump vec4 v_color;
varying mediump vec2 v_texcoord;
#else
varying vec4 v_color;
varying vec2 v_texcoord;
#endif
void main()
{
#if defined GL_OES_standard_derivatives
gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord));
#else
gl_FragColor = v_color*step(0.0, 1.0 - length(v_texcoord));
#endif
}
2015-09-22 09:22:49.353 WeeSubs[713:314073] cocos2d: ERROR: 0:12: '' : syntax error: #extension must always be before any non-preprocessor tokens
I looked it up an stumbled into this post: http://forum.cocos2d-objc.org/t/xcode-7-ios9-beta/17346 Which is for the latest version.
And there appears to be a pull request fixing my issue: https://github.com/cocos2d/cocos2d-iphone-classic/pull/7
Thanks for considering it