Android Open Source - mic-check Display Open G L Activity






From Project

Back to project page mic-check.

License

The source code is released under:

GNU General Public License

If you think the Android project mic-check listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.ruman.experiments.miccheck;
//  w w  w  .  ja  va2 s.  com
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.Menu;

public class DisplayOpenGLActivity extends Activity {

  
  private GLSurfaceView mGLView;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    mGLView = new MyGLSurfaceView(this);
    setContentView(mGLView);
  }

  
  // We need to extend GLSurfaceView because we may want to use touch input later,
  // which we cannot do if we just use a regular GLSurfaceView.
  class MyGLSurfaceView extends GLSurfaceView
  {
    public MyGLSurfaceView(Context context)
    {
      // Initialize the parent class first
      super(context);
      // This should be an OpenGL ES 2.0 context
      setEGLContextClientVersion(2);
      setRenderer(new MyRenderer());
      // Render the view only when the drawing data has changed for efficiency
      setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);
    }
  }

}




Java Source Code List

com.ruman.experiments.miccheck.DisplayOpenGLActivity.java
com.ruman.experiments.miccheck.MainActivity.java
com.ruman.experiments.miccheck.MyRenderer.java