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 about 5 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:
https://github.com/cocos2d/cocos2d-x/pull/6876

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

Status:Closed
Start date:2014-05-28
Priority:High
Due date:
Assignee:vision
% Done:

0%

Category:all
Target version:v3.2