Projects > cpp > Issues > Bug #3684

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

Create Issue on Github

Refactor #3650: Improving New Renderer

Manual creation of TextureAtlas not working

Bug #3684 [Closed]
nite 2014-01-13 21:16 . Updated almost 3 years ago
  1. Start TestCpp
  2. Select LabelTest
  3. Keep going for next test until you see “Manual creation of TextureAtlas” TestCase.

v2.2.2.jpg (288.4 kB) zhangbin@cocos2d-x.org, 2014-02-28 02:23

v3.x.jpg (123.6 kB) zhangbin@cocos2d-x.org, 2014-02-28 02:23

ricardo 2014-01-14 18:05

Do you mean auto generation of Texture Atlas in runtime ?

If so, we need to understand how / when to use it.

nite 2014-01-22 19:33
  • Description updated (diff)

Updated reproduce instructions

zhangxm 2014-02-21 09:20
  • Description updated (diff)
  • Assignee set to dabingnn
zhangbin@cocos2d-x.org 2014-02-27 02:32
  • Assignee changed from dabingnn to zhangbin@cocos2d-x.org
dabingnn 2014-02-27 02:33

On release 3.0 beta2, the test case has nothing rendered on the screen.
Now the result can be rendered, but it is different with v2.x

zhangbin@cocos2d-x.org 2014-02-28 02:23

dabingnn wrote:

Now the result can be rendered, but it is different with v2.x

Yep, the appearance of TextureAtlas is depends on the GL status when it's rendered. Because it doesn't setup GL status itself.

Now the effect of the test case in TestCpp is related with the CCAtlasNode's GL status. And the CCAtlasNode's GL status in v3.x is different with the one in v2.x. So the result of the test case in v3.x is different with v2.x.

PS:
I get the result by my test both on v2.2.2 & v3.0-current:
1. New a project.
2. Add a TextureAtlas into the scene.
3. Remove other nodes.

The effect in v2.2.2 is:
v2.2.2.jpg

And the effect in v3.x is:
v3.x.jpg

If the parameter of method Director::setDisplayStats() is set to false, there is nothing was rendered.
The FPS is rendered with AtlasNode. So, I get the result :
In the test case of TestCpp, the effect of TextureAtlas is affected by the AtlasNode's GL status.

zhangbin@cocos2d-x.org 2014-02-28 02:23
  • File v2.2.2.jpg added
  • File v3.x.jpg added

dabingnn wrote:

Now the result can be rendered, but it is different with v2.x

Yep, the appearance of TextureAtlas is depends on the GL status when it's rendered. Because it doesn't setup GL status itself.

Now the effect of the test case in TestCpp is related with the CCAtlasNode's GL status. And the CCAtlasNode's GL status in v3.x is different with the one in v2.x. So the result of the test case in v3.x is different with v2.x.

PS:
I get the result by my test both on v2.2.2 & v3.0-current:
1. New a project.
2. Add a TextureAtlas into the scene.
3. Remove other nodes.

The effect in v2.2.2 is:
!v2.2.2.jpg!
And the effect in v3.x is:
!v3.x.jpg!

If the parameter of method Director::setDisplayStats() is set to false, there is nothing was rendered.
The FPS is rendered with AtlasNode. So, I get the result :
In the test case of TestCpp, the effect of TextureAtlas is affected by the AtlasNode's GL status.

zhangbin@cocos2d-x.org 2014-02-28 03:25
  • File deleted (v2.2.2.jpg)
zhangbin@cocos2d-x.org 2014-02-28 03:25
  • File deleted (v3.x.jpg)
zhangbin@cocos2d-x.org 2014-02-28 06:52
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:9f46678c345e2fec1fa564366079bd9703e18ec6.

Atom PDF

Status:Closed
Start date:2014-01-13
Priority:Normal
Due date:
Assignee:zhangbin@cocos2d-x.org
% Done:

100%

Category:all
Target version:3.0-rc0

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