コード例 #1
0
 /**
  * Install a custom EGLConfigChooser.
  * <p>
  * If this method is called, it must be called before
  * {@link #setRenderer(Renderer)} is called.
  * <p>
  * If no setEGLConfigChooser method is called, then by default the view will
  * choose a config as close to 16-bit RGB as possible, with a depth buffer
  * as close to 16 bits as possible.
  *
  * @param configChooser
  */
 public void SetEGLConfigChooser(EGLConfigChooser configChooser)
 {
     if (this.mRenderer != null)
     {
         throw new IllegalStateException("setRenderer has already been called for this instance.");
     }
     this.mEGLConfigChooser = configChooser;
 }
コード例 #2
0
 /**
  * Inform the view that the activity is resumed. The owner of this view must
  * call this method when the activity is resumed. Calling this method will
  * recreate the OpenGL display and resume the rendering thread. Must not be
  * called before a renderer has been set.
  */
 public void OnResume()
 {
     if (this.mEGLConfigChooser == null)
     {
         this.mEGLConfigChooser = new SimpleEGLConfigChooser(true);
     }
     this.mGLThread = new GLThread(this.mRenderer);
     this.mGLThread.Start();
     this.mGLThread.SetRenderMode(this.mRenderMode);
     if (this.mHasSurface)
     {
         this.mGLThread.SurfaceCreated();
     }
     if (this.mSurfaceWidth > 0 && this.mSurfaceHeight > 0)
     {
         this.mGLThread.OnWindowResize(this.mSurfaceWidth, this.mSurfaceHeight);
     }
     this.mGLThread.OnResume();
 }
コード例 #3
0
 /**
  * Inform the view that the activity is resumed. The owner of this view must
  * call this method when the activity is resumed. Calling this method will
  * recreate the OpenGL display and resume the rendering thread. Must not be
  * called before a renderer has been set.
  */
 public void OnResume()
 {
     if (this.mEGLConfigChooser == null)
     {
         this.mEGLConfigChooser = new SimpleEGLConfigChooser(true);
     }
     this.mGLThread = new GLThread(this.mRenderer);
     this.mGLThread.Start();
     this.mGLThread.SetRenderMode(this.mRenderMode);
     if (this.mHasSurface)
     {
         this.mGLThread.SurfaceCreated();
     }
     if (this.mSurfaceWidth > 0 && this.mSurfaceHeight > 0)
     {
         this.mGLThread.OnWindowResize(this.mSurfaceWidth, this.mSurfaceHeight);
     }
     this.mGLThread.OnResume();
 }
コード例 #4
0
 /**
  * Install a custom EGLConfigChooser.
  * <p>
  * If this method is called, it must be called before
  * {@link #setRenderer(Renderer)} is called.
  * <p>
  * If no setEGLConfigChooser method is called, then by default the view will
  * choose a config as close to 16-bit RGB as possible, with a depth buffer
  * as close to 16 bits as possible.
  * 
  * @param configChooser
  */
 public void SetEGLConfigChooser(EGLConfigChooser configChooser)
 {
     if (this.mRenderer != null)
     {
         throw new IllegalStateException("setRenderer has already been called for this instance.");
     }
     this.mEGLConfigChooser = configChooser;
 }