cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.07k stars 902 forks source link

webgl mode in newest chrome doesn't work anymore #1230

Closed roed closed 10 years ago

roed commented 10 years ago

On november 15, our program suddenly stopped working, because of the newest chrome version.

We get the following error, when starting the application: cocos2d: ERROR: Failed to link program: [object WebGLProgram]

The chrome version is 31.0.1650.57 m

You can also view this error when visiting the demo section on the cocos2d test demo's: http://www.cocos2d-x.org/html5-samples/samples/tests/index.html

roed commented 10 years ago

It seems it has something to do with the shaders. Every shader loaded in _loadDefaultShader in CCShaderCache.js gives the error. (all 8) Nothing has changed in those shaders for 6 months, so it's a weird error.

Other javascript libraries for webgl still work, for example three.js.

roed commented 10 years ago

And yet, that's not the problem. If I create an empty shader:

void main(){ }

the program can still not be linked.

roed commented 10 years ago

sorry, this one is a duplicate of: https://github.com/cocos2d/cocos2d-html5/pull/1224

Has already been fixed, but hasn't been placed on the examples on the cocos2d-x website.