Projects > cpp > Issues > Bug #4600

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

CCGLProgram::compileShader() aborts the program

Bug #4600 [Closed]
a_maruyama 2014-03-28 10:24 . Updated almost 10 years ago

CCGLProgram::compileShader() calls abort() when the shader program is invalid.
But it should return false.

What I want to do is this:

・Shader A: Better performance. Compilable on some device, not on the other device.
・Shader B: Worse performance. Compilable on all devices.

In this case, first I want to try using shader A, and on failure, next shader B.

But current behavior make the program aborted when failed in shader A, so I can't try shader B.
To do this, I have to try glCompileShader(shader A) manually and re-compile with CCGLProgram::initWithVertexShaderByteArray(), it is inefficient.
If CCGLProgram::compileShader() returns false on failure, this'll be more simple.
I have only to call CCGLProgram::initWithVertexShaderByteArray() twice. 2014-10-08 02:48

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to

Atom PDF

Start date:2014-03-28
Due date:
% Done:


Target version:-