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 about 2 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.

walzer@cocos2d-x.org 2014-10-08 02:48

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

This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8389

Atom PDF

Status:Closed
Start date:2014-03-28
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:all
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.