开发者社区> 问答> 正文

xcode 7.2.1 新建cocos2d项目 运行报错?报错

Warning: Error creating LLDB target at path '/Users/sweetieTAM/Library/Developer/Xcode/DerivedData/GP_CrazyForest_v2.0-ffxxxkrfizurpfgqrvqonkczmogo/Build/Products/Debug-iphonesimulator/GP_CrazyForest_v2.0.app'- using an empty LLDB target which can cause slow memory reads from remote devices.

2016-02-21 20:46:48.938 GP_CrazyForest_v2.0[7979:302989] 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

}

2016-02-21 20:46:48.939 GP_CrazyForest_v2.0[7979:302989] cocos2d: ERROR: 0:12: '' : syntax error: #extension must always be before any non-preprocessor tokens

(lldb) 

展开
收起
爱吃鱼的程序员 2020-06-10 14:09:57 807 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    我也有这样的问题,不知道怎么解决

    syntaxerror:#extensionmustalwaysbebeforeanynon-preprocessortokens

    2020-06-10 14:10:13
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载