Java 类com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView20 实例源码

项目:ingress-indonesia-dev    文件:AndroidGraphics.java   
private View createGLSurfaceView(Activity paramActivity, boolean paramBoolean, ResolutionStrategy paramResolutionStrategy)
{
  if ((paramBoolean) && (checkGL20()))
  {
    GdxEglConfigChooser20 localGdxEglConfigChooser20 = getEglConfigChooser20();
    GLSurfaceView20 localGLSurfaceView20 = new GLSurfaceView20(paramActivity, paramResolutionStrategy);
    if (localGdxEglConfigChooser20 != null)
      localGLSurfaceView20.setEGLConfigChooser(localGdxEglConfigChooser20);
    while (true)
    {
      localGLSurfaceView20.setRenderer(this);
      return localGLSurfaceView20;
      localGLSurfaceView20.setEGLConfigChooser(this.config.r, this.config.g, this.config.b, this.config.a, this.config.depth, this.config.stencil);
    }
  }
  return null;
}
项目:ZombieInvadersVR    文件:CardBoardGraphics.java   
protected void preserveEGLContextOnPause () {
   int sdkVersion = android.os.Build.VERSION.SDK_INT;
   if ((sdkVersion >= 11 && view instanceof GLSurfaceView20) || view instanceof GLSurfaceView20API18) {
      try {
         view.getClass().getMethod("setPreserveEGLContextOnPause", boolean.class).invoke(view, true);
      } catch (Exception e) {
         Gdx.app.log(LOG_TAG, "Method GLSurfaceView.setPreserveEGLContextOnPause not found");
      }
   }
}
项目:libgdxcn    文件:AndroidGraphics.java   
protected void preserveEGLContextOnPause () {
    int sdkVersion = android.os.Build.VERSION.SDK_INT;
    if ((sdkVersion >= 11 && view instanceof GLSurfaceView20) || view instanceof GLSurfaceView20API18) {
        try {
            view.getClass().getMethod("setPreserveEGLContextOnPause", boolean.class).invoke(view, true);
        } catch (Exception e) {
            Gdx.app.log(LOG_TAG, "Method GLSurfaceView.setPreserveEGLContextOnPause not found");
        }
    }
}
项目:ingress-indonesia-dev    文件:AndroidGraphics.java   
private void setupGL(javax.microedition.khronos.opengles.GL10 paramGL10)
{
  if ((this.gl10 != null) || (this.gl20 != null))
    return;
  if ((this.view instanceof GLSurfaceView20))
  {
    this.gl20 = new AndroidGL20();
    this.gl = this.gl20;
  }
  while (true)
  {
    this.glu = new AndroidGLU();
    Gdx.gl = this.gl;
    Gdx.gl10 = this.gl10;
    Gdx.gl11 = this.gl11;
    Gdx.gl20 = this.gl20;
    Gdx.glu = this.glu;
    Gdx.app.log("AndroidGraphics", "OGL renderer: " + paramGL10.glGetString(7937));
    Gdx.app.log("AndroidGraphics", "OGL vendor: " + paramGL10.glGetString(7936));
    Gdx.app.log("AndroidGraphics", "OGL version: " + paramGL10.glGetString(7938));
    Gdx.app.log("AndroidGraphics", "OGL extensions: " + paramGL10.glGetString(7939));
    return;
    this.gl10 = new AndroidGL10(paramGL10);
    this.gl = this.gl10;
    if ((paramGL10 instanceof javax.microedition.khronos.opengles.GL11))
    {
      String str = paramGL10.glGetString(7937);
      if ((str != null) && (!str.toLowerCase().contains("pixelflinger")) && (!Build.MODEL.equals("MB200")) && (!Build.MODEL.equals("MB220")) && (!Build.MODEL.contains("Behold")))
      {
        this.gl11 = new AndroidGL11((javax.microedition.khronos.opengles.GL11)paramGL10);
        this.gl10 = this.gl11;
      }
    }
  }
}