0
     * 
     * @param usePhysics    true to enable physics simulation 
     */ 
    protected void createEngine(boolean usePhysics) {
        // create and initialize the GLSurfaceView 
        GLSurfaceView glView = new GLSurfaceView(this);
        createEngine(glView, usePhysics);
 
        // set the GL view as Activity's only content 
        setContentView(glView);
    } 
 
    /** 
     * Call this method from your Activity's onCreate() method and pass the GLSurfaceView from your 
     * layout. 
     * 
     * @param glView        GLSurfaceView to use for graphics output 
     * @param usePhysics    true to enable physics simulation 
     */ 
    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    protected void createEngine(GLSurfaceView glView, boolean usePhysics) {
        // initialize graphics engine 
        mEngine = new GfxEngine(getApplicationContext(), usePhysics);
        mEngine.setEngineListener(this);
 
        mGlView = glView;
 
        // enable GLES 2.0 
        mGlView.setEGLContextClientVersion(2);
        // set desired GL config 
        GlConfiguration config = new GlConfiguration();
        config.setNumSamples(mNumSamples);
        mGlView.setEGLConfigChooser(config);
        // register graphics engine as GL renderer 
        mGlView.setRenderer(mEngine);
 
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
            // if available preserve the GL context for faster visibility changes 
            mGlView.setPreserveEGLContextOnPause(true);
        } 
 
        mCreated = true;
    }