Skip to content

Commit 0cbaec9

Browse files
authored
don't set glview transparent, it many cause afterimage (#20298) (#20299)
1 parent 0942895 commit 0cbaec9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ public void init() {
300300
public Cocos2dxGLSurfaceView onCreateView() {
301301
Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
302302
//this line is need on some device if we specify an alpha bits
303-
if(this.mGLContextAttrs[3] > 0) glSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
303+
// FIXME: is it needed? And it will cause afterimage.
304+
// if(this.mGLContextAttrs[3] > 0) glSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
304305

305306
// use custom EGLConfigureChooser
306307
Cocos2dxEGLConfigChooser chooser = new Cocos2dxEGLConfigChooser(this.mGLContextAttrs);

0 commit comments

Comments
 (0)