GLSurfaceView surfaceView = new GLSurfaceView(this);
surfaceView.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY)
For developers wishing to display OpenGL rendering, when choosing the rendering mode with GLSurfaceView#setRenderMode(int renderMode), using RENDERMODE_WHEN_DIRTY instead of RENDERMODE_CONTINUOUSLY (by default) can improve battery life and overall system performance by allowing the GPU and CPU to idle when the view does not need to be updated.
GLSurfaceView surfaceView = new GLSurfaceView(this);
surfaceView.setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY)
GLSurfaceView surfaceView = new GLSurfaceView(this);
surfaceView.setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY)