21 package com.arm.malideveloper.openglessdk.threadsync;
23 import javax.microedition.khronos.egl.EGLConfig;
24 import javax.microedition.khronos.opengles.GL10;
25 import android.content.Context;
26 import android.opengl.GLSurfaceView;
27 import android.os.Bundle;
28 import android.view.Window;
29 import android.view.WindowManager;
30 import com.arm.malideveloper.openglessdk.*;
31 import android.view.MotionEvent;
32 import android.view.View;
33 import android.view.View.OnTouchListener;
37 public ThreadSyncView(Context context,
MaliSamplesView.GlesVersion version)
39 super(context, version);
42 @Override
protected void setRendererCallback()
44 setRenderer(
new Renderer());
47 @Override
protected void destroyContextCallback()
76 public static native
void step();
77 public static native
void uninit();
80 public static native
void touchMove (
int x,
int y);
81 public static native
void touchEnd (
int x,
int y);
83 @Override
protected void onCreate(Bundle icicle)
85 super.onCreate(icicle);
87 this.requestWindowFeature(Window.FEATURE_NO_TITLE);
88 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
89 WindowManager.LayoutParams.FLAG_FULLSCREEN);
91 mView =
new ThreadSyncView(getApplication(),
MaliSamplesView.GlesVersion.GLES3);
92 setContentView(mView);
115 System.loadLibrary(
"Native");
118 @Override
public boolean onTouch(View
v, MotionEvent event)
128 switch (event.getAction())
130 case MotionEvent.ACTION_DOWN:
134 case MotionEvent.ACTION_MOVE:
139 case MotionEvent.ACTION_UP:
static native void uninit()
void onCreate(Bundle icicle)
boolean onTouch(View v, MotionEvent event)
static native void touchEnd(int x, int y)
static native void init(int width, int height)
GLint GLsizei GLsizei height
void onDrawFrame(GL10 gl)
void onSurfaceChanged(GL10 gl, int width, int height)
static native void step()
boolean onTouchEvent(MotionEvent event)
GLint GLint GLint GLint GLint x
void onSurfaceCreated(GL10 gl, EGLConfig config)
static native void touchMove(int x, int y)
static native void touchStart(int x, int y)