Back to project page android-per-pixel-lighting-demo.
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.
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; } }