Projects > cpp > Issues > Bug #5393

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

Create Issue on Github

GLProgramState::setUniformTexture bug when updating texture

Bug #5393 [Closed]
dabingnn 2014-05-28 07:00 . Updated almost 6 years ago

A test case to reproduce the bug:
you have for sampler in the shader cctexture0, cctexture1, cctexture2, cctexture3.
At first, you can set them all by calling GLProgramState::setUniformTexture. Then after a while, if you have changed the texture of cctexture3 by setUniformTexture('cctexture3', newTexture), it will not work again.

Proposed solution for this: given the glprogram, GLprogramstate should remember the textureUnitIndex for texture, then reuse it if user update the uniform.

dabingnn 2014-05-28 07:20

Original discussion details link:

zhangxm 2014-05-29 08:18
  • Assignee set to dabingnn
vision 2014-06-09 03:18
zhangxm 2014-06-10 01:58
  • Status changed from New to Resolved
  • Assignee changed from dabingnn to vision
zhangxm 2014-06-25 03:39
  • Status changed from Resolved to Closed

Atom PDF

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


Target version:v3.2