Code example for GLSurfaceView

Methods: setEGLConfigChooser, setRenderer

0
    private final static boolean USE_STREAM_IO = false;
 
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mGLView = new GLSurfaceView(this);
        mGLView.setEGLConfigChooser(false);
        StaticTriangleRenderer.TextureLoader loader; 
        if (TEST_CREATE_TEXTURE) {
            loader = new SyntheticCompressedTextureLoader(); 
        } else { 
            loader = new CompressedTextureLoader(); 
        } 
        mGLView.setRenderer(new StaticTriangleRenderer(this, loader));
        setContentView(mGLView);
    } 
 
    @Override 
    protected void onPause() { 
        super.onPause(); 
        mGLView.onPause();