Projects > cpp > Issues > Bug #5877

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

Create Issue on Github

Unkown commands in renderQueue

Bug #5877 [Closed]
owen 2014-09-01 02:25 . Updated over 10 years ago

How to reproduce this issue:

  1. use cocos new -l cpp to create a new project
  2. add the following code in the HelloWorldScene's init method:
    auto renderTexture = RenderTexture::create(visibleSize.width, visibleSize.height);
    renderTexture->setPosition(Vec2(visibleSize.width/2, visibleSize.height/2));
    this->addChild(renderTexture, 10);

    auto bgSprite = Sprite::create("HelloWorld.png");
    bgSprite->setAnchorPoint(Vec2(0.5,0.5));
    bgSprite->setPosition(center);
    renderTexture->begin();
    bgSprite->visit();
    renderTexture->end();
  1. build and run the project, you will see the console output this error message.
wushi333333 2014-09-10 02:23

我也遇到这个问题了,如果解决了,希望能通知我,我用的是3.1.1,wushi333333@163.com.谢谢

dabingnn 2014-09-10 06:41

There is an thread opened in the forum, which is used for talking about the bug.
Link:
http://discuss.cocos2d-x.org/t/bugs-for-unknown-commands-in-renderer/16865

We can discuss it in detail there
Thanks.

dabingnn 2014-09-18 09:55

As discussed in the forum, the bug could be solved like this:
1. Basically, renderCommand could only be added to renderer in the function Director::DrawScene()
2. If there is any command added to render out of the Director::DrawScene(), user should called renderer->render() manually.

This is not a final solution, we will continue working on this to find a better solution.
This is is going to be postponed

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

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

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

Atom PDF

Status:Closed
Start date:2014-09-01
Priority:Normal
Due date:
Assignee:dabingnn
% Done:

0%

Category:all
Target version:v3.3