CCRenderTexture on Android sleep/resume, Drawing does not operate anymore

Hi,
When a TestCpp example(RenderTextureTest::Touch the Screen Test) goes into the background, and resume
RenderTexture is alive but Drawing does not operate anymore.
is this normal?
Test by galaxy tab 10.1(Honey comb 3.x) : cocos2d-x v2.2.2

Maybe, do you mean like this:

http://www.cocos2d-x.org/issues/3540#change-9338

As Ken says, I recreate the renderTexture after background/foreground.

Certainly, I have to save the renderTexture on file (on background) and then relaod it (on fereground)

Also, this can be usefull if you want to reload a rendertexture with alpha

Don

I have the same issue on the cocos2d-x 2.2.3.
On all my devices: Lg Nexus 4, Acer Iconia A701, Acer Liquid :frowning:
http://www.cocos2d-x.org/issues/3540 is Closed. It works for cocos2d-x 3.0?
Is there an open issue for this?

Is this issue revived in 3.2rc0?
I meet the same issue (Android 4.0.3) and I temporary remove rendertexture in my code

EDITED
I suspect the alpha channel is lost in my RenderTexture when it resume

OK.
I found two issues when Android sleep/resume for 3.2 rc0.

  1. If I set clear color using cocos2d::Color4F(0, 0, 0, 0), the alpha channel is lost and so my game screen turns to BLACK. I use the following code

    _particleLayer->setClearFlags(GL_COLOR_BUFFER_BIT); _particleLayer->setClearColor(cocos2d::Color4F(0, 0, 0, 0)); _particleLayer->setAutoDraw(true);  
    ;

  2. If I have setup DesignResolution (glview->setDesignResolutionSize with ResolutionPolicy::FIXED_WIDTH) in AppDelegate, the RenderTexture will lose the configuration after resume

Hopefully, someone please help as I am going to release my app soon

I finally found out that the event EVENT_COME_TO_FOREGROUND is not called when I switch back from background to foreground. But EVENT_COME_TO_BACKGROUND is able to called.

In that case, I remove the RenderTexture whenever EVENT_COME_TO_BACKGROUND is called. Then recreate afterwards

winipcfg, could you explain more? Were you able to solve the issue? I’m using cocos2d-x 3.4, and when Android devices are in my game and go to sleep, the game restarts when they come out of sleep.

thanks