Skip to content

Commit f2ab921

Browse files
authored
don't set glview transparent, it many cause afterimage (#20298)
1 parent 195720b commit f2ab921

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
@@ -301,7 +301,8 @@ public void init() {
301301
public Cocos2dxGLSurfaceView onCreateView() {
302302
Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
303303
//this line is need on some device if we specify an alpha bits
304-
if(this.mGLContextAttrs[3] > 0) glSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
304+
// FIXME: is it needed? And it will cause afterimage.
305+
// if(this.mGLContextAttrs[3] > 0) glSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
305306

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

0 commit comments

Comments
 (0)