Android Open Source - android-per-pixel-lighting-demo Engine G L Surface View






From Project

Back to project page android-per-pixel-lighting-demo.

License

The source code is released under:

Apache License

If you think the Android project android-per-pixel-lighting-demo 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.pedroedrasousa.engine;
//from  w  w  w  . ja v  a2 s.  c o  m
import android.util.AttributeSet;
import android.content.Context;
import android.opengl.GLSurfaceView;
import android.view.MotionEvent;

public class EngineGLSurfaceView extends GLSurfaceView {
  
  private OnTouchListener mOnTouchListener;

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

  public void setRenderer(Renderer renderer)  {
    super.setRenderer(renderer);
  }
  
  public void setTouchEventHandler(OnTouchListener touchListener) {
    mOnTouchListener = touchListener;
  }
  
  @Override
  public boolean onTouchEvent(MotionEvent event) {
    if (mOnTouchListener != null)
      mOnTouchListener.onTouch(null, event);
    super.onTouchEvent(event);
    return true;
  }
}




Java Source Code List

com.pedroedrasousa.engine.EngineGLSurfaceView.java
com.pedroedrasousa.engine.Renderer.java
com.pedroedrasousa.engine.ShaderProgram.java
com.pedroedrasousa.engine.Texture.java
com.pedroedrasousa.engine.Vec2.java
com.pedroedrasousa.engine.Vec3.java
com.pedroedrasousa.object3d.Mesh.java
com.pedroedrasousa.object3d.Model.java
com.pedroedrasousa.object3d.ObjLoader.java
com.pedroedrasousa.object3d.Triangle.java
com.pedroedrasousa.object3d.Vertex.java
com.pedroedrasousa.perpixellightingdemo.MainActivity.java
com.pedroedrasousa.perpixellightingdemo.PerPixelLighting.java