Skip to content

Commit 1427575

Browse files
committed
Fix xcode 7 crash fix when using CCDrawNode
1 parent fc05eb0 commit 1427575

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cocos2d/CCDrawNode.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@
5353
@"}\n";
5454
#else
5555
static NSString *CCDrawNodeFragmentShaderSource =
56-
@"#ifdef GL_ES\n"
57-
@"#extension GL_OES_standard_derivatives : enable\n"
58-
@"#endif\n"
59-
@"\n"
6056
@"void main(){\n"
6157
@" gl_FragColor = cc_FragColor*smoothstep(0.0, length(fwidth(cc_FragTexCoord1)), 1.0 - length(cc_FragTexCoord1));\n"
6258
@"}\n";

cocos2d/CCShader.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
// These are the lines loaded for both vertex and fragment shaders
6363

6464
static NSString *CCShaderHeader =
65+
@"#ifdef GL_ES\n"
66+
@"#ifdef GL_OES_standard_derivatives\n"
67+
@"#extension GL_OES_standard_derivatives : enable\n"
68+
@"#endif\n"
69+
@"#endif\n"
6570
@"#ifndef GL_ES\n"
6671
@"#define lowp\n"
6772
@"#define mediump\n"

0 commit comments

Comments
 (0)