We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
RenderTextureTest not draw after a background/foreground
RenderTextureTest not draw after a background/foreground
Bug #3540 [Closed]
"RenderTextureTest" worked when "Cocos2dxRenderer.java" was changed to this.
Example code
public class Cocos2dxRenderer implements GLSurfaceView.Renderer { ... private static int resumeflg = -1; ... @Override public void onSurfaceCreated(final GL10 pGL10, final EGLConfig pEGLConfig) { resumeflg = 1; Cocos2dxRenderer.nativeInit(this.mScreenWidth, this.mScreenHeight); this.mLastTickInNanoSeconds = System.nanoTime(); } @Override public void onSurfaceChanged(final GL10 pGL10, final int pWidth, final int pHeight) { if(resumeflg==2) { resumeflg = 1; this.onSurfaceCreated(pGL10,null); } } ... public void handleOnPause() { resumeflg = 2; Cocos2dxRenderer.nativeOnPause(); } ... }
Not change the "Cocos2dxRenderer.java".
"RenderTextureTest" worked when "Cocos2dxGLSurfaceView.java" was changed to this.
I remove this comment out.
//super.onPause();
Reload of resources was been tested?
https://github.com/cocos2d/cocos2d-x/commit/b26d64715f818c036df2f4cb5dcdf7cd0b320a20
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset commit:a6db195279a3e49b512a354c0c67fbe563ef9cac.
@all
The problem has been resolved. You can take a look at this pull request:
https://github.com/cocos2d/cocos2d-x/pull/5401
Status: | Closed | |
---|---|---|
Start date: | 2013-12-30 | |
Priority: | Low | |
Due date: | ||
Assignee: | ||
% Done: | 100% |
|
Category: | android | |
Target version: | 3.0-rc0 |
In case of standby and resume, the first sample of RenderTextureTest doesn’t work on many android device.
I’m not able to draw.
I tested Samsung Galaxy S Plus, Nexus 7, Asus TF300 and Kindle HD 2nd gen