android Opengl中使得一个view在另一个view上面显示

public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        LoadImage.load(getResources());
        myRenderer = new MyRenderer(true);
        glSurfaceView = new GLSurfaceView(this);
        glSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
        glSurfaceView.setRenderer(myRenderer);
        glSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
        glSurfaceView.setZOrderOnTop(true);
        setContentView(glSurfaceView);
    }

相关推荐