Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unkown commands in renderQueue #8534

Closed
minggo opened this issue Sep 30, 2014 · 1 comment
Closed

Unkown commands in renderQueue #8534

minggo opened this issue Sep 30, 2014 · 1 comment
Labels

Comments

@minggo
Copy link
Contributor

minggo commented Sep 30, 2014

Note

This issue is migrated from here. It was created at 2014/09/01 02:25:32 +0000

Description

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.
  2. wushi333333 added comment:
    我也遇到这个问题了,如果解决了,希望能通知我,我用的是3.1.1,wushi333333@163.com.谢谢

We can discuss it in detail there
Thanks.

  • dabingnn added comment:
    As discussed in the forum, the bug could be solved like this:
  • Basically, renderCommand could only be added to renderer in the function Director::DrawScene()
  • 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 walzer added this to the unplanned milestone May 1, 2015
@walzer walzer added the type:bug label May 1, 2015
@minggo
Copy link
Contributor Author

minggo commented Jun 29, 2016

I tested it with latest codes, and could not reproduce it, so close it.

@minggo minggo closed this as completed Jun 29, 2016
@minggo minggo removed this from the unplanned milestone Jun 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants