Android Open Source - OpenGL-2D-Engine Open G L2 D Surface View






From Project

Back to project page OpenGL-2D-Engine.

License

The source code is released under:

Apache License

If you think the Android project OpenGL-2D-Engine 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.foolish.a2de;
//from w  ww. jav  a  2  s  .  c o  m
import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;

import com.foolish.a2de.graphics.OpenGL2DRenderer;

public class OpenGL2DSurfaceView extends GLSurfaceView {

  protected OpenGL2DRenderer mRenderer;
  float speedX = 0.0f;

  public OpenGL2DSurfaceView(Context context) {
    super(context);
    init(context);
  }

  public OpenGL2DSurfaceView(Context context, AttributeSet attrs) {
    super(context, attrs);
    init(context);
  }

  protected void init(Context context) {
    setEGLContextClientVersion(2);
    mRenderer = new OpenGL2DRenderer(context);
    setRenderer(mRenderer);
  }

}




Java Source Code List

com.foolish.a2de.OpenGL2DActivity.java
com.foolish.a2de.OpenGL2DSurfaceView.java
com.foolish.a2de.graphics.OpenGL2DRenderer.java
com.foolish.a2de.graphics.Rectangle.java
com.foolish.a2de.graphics.Shape.java
com.foolish.a2de.graphics.Sprite.java
com.foolish.a2de.graphics.Triangle.java
com.foolish.a2de.physics.IPhysics2D.java
com.foolish.a2de.physics.SimpleRectanglePhysics.java