Code example for GLSurfaceView

Methods: setRenderer

0
 */ 
public class MatrixPaletteActivity extends Activity {
    @Override 
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mGLSurfaceView = new GLSurfaceView(this);
        mGLSurfaceView.setRenderer(new MatrixPaletteRenderer(this));
        setContentView(mGLSurfaceView);
    } 
 
    @Override 
    protected void onResume() { 
        // Ideally a game should implement onResume() and onPause() 
        // to take appropriate action when the activity looses focus 
        super.onResume(); 
        mGLSurfaceView.onResume();
    } 
 
    @Override 
    protected void onPause() { 
        // Ideally a game should implement onResume() and onPause()