setRenderer

/** Set the renderer associated with this view. Also starts the thread that will call the renderer, which in turn causes the rendering to start.

This method should be called once and only once in the life-cycle of a SurfaceView. The following SurfaceView methods can only be called after setRenderer is called:

Parameters

renderer

the renderer to use to perform drawing.