org.openintents.samples.openglsensors
Class GLSurfaceView

java.lang.Object
  extended by SurfaceView
      extended by org.openintents.samples.openglsensors.GLSurfaceView

public class GLSurfaceView
extends SurfaceView

Holds the Open GL surface. This class also contains the GLThread class that takes care of graphics updates.


Constructor Summary
GLSurfaceView(Context context, OpenGLSensors newOpenGLAccelerator)
          The View constructor is a good place to allocate our OpenGL context
 
Method Summary
 void holdAnimation()
          Holds animation temporarily.
 void resumeAnimation()
          Resumes animation.
 void startUseSensors()
           
 void stopUseSensors()
           
 void surfaceChanged(SurfaceHolder holder, int format, int w, int h)
           
 void surfaceCreated(SurfaceHolder holder)
           
 void surfaceDestroyed(SurfaceHolder holder)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLSurfaceView

public GLSurfaceView(Context context,
                     OpenGLSensors newOpenGLAccelerator)
The View constructor is a good place to allocate our OpenGL context

Method Detail

surfaceCreated

public void surfaceCreated(SurfaceHolder holder)

surfaceDestroyed

public void surfaceDestroyed(SurfaceHolder holder)

surfaceChanged

public void surfaceChanged(SurfaceHolder holder,
                           int format,
                           int w,
                           int h)

startUseSensors

public void startUseSensors()

stopUseSensors

public void stopUseSensors()

holdAnimation

public void holdAnimation()
Holds animation temporarily. This can be called onPause() to save CPU power consumption.


resumeAnimation

public void resumeAnimation()
Resumes animation. Only to be called after holdAnimation().