Android GLSurfaceView transparent

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/Kennethdroid/article/details/90450088

GLSurfaceView set at initialization

        setEGLConfigChooser(8, 8, 8, 8, 16, 0);
        getHolder().setFormat(PixelFormat.TRANSLUCENT);
        setZOrderOnTop(true);
        setRenderer(mRenderer);

onDrawFrame transfer glClearColor

        @Override
        public void onDrawFrame(GL10 gl10) {
            GLES20.glClearColor(0,0,0,0);
        }

Guess you like

Origin blog.csdn.net/Kennethdroid/article/details/90450088