openGL ES change the render mode from RENDERMODE WHEN DIRTY to RENDERMODE CONTINUOUSLY on touch i want to change the rendermode from RENDERMODE WHEN DIRTY to RENDERMODE CONTINUOUSLY when i touch the screen. WHAT i Need Initially the object should be stationary. after touching the screen, it should move automatically. The motion of my object is a projectile motion ans it is working fine. what i get Force close and a NULL pointer exception. My code public class BallThrowGLSurfaceView extends GLSurfaceView MyRender renderObj Context context GLSurfaceView glView public BallThrowGLSurfaceView(Context context) super(context) TODO Auto generated constructor stub renderObj new MyRender(context) this.setRenderer( renderObj) this.setRenderMode(RENDERMODE WHEN DIRTY) this.requestFocus() this.setFocusableInTouchMode(true) glView new GLSurfaceView(context.getApplicationContext()) Override public boolean onTouchEvent(MotionEvent event) TODO Auto generated method stub if (event ! null) if (event.getAction() MotionEvent.ACTION DOWN) if ( renderObj ! null) Log.i("renderObj", renderObj "lll") Ensure we call switchMode() on the OpenGL thread. queueEvent() is a method of GLSurfaceView that will do this for us. queueEvent(new Runnable() public void run() glView.setRenderMode(RENDERMODE CONTINUOUSLY) ) return true return super.onTouchEvent(event) PS i know that i am making some silly mistakes in this, but cannot figure out what it really is.