Android Open Source - AndroidSensorApp Native Open G L Renderer






From Project

Back to project page AndroidSensorApp.

License

The source code is released under:

Apache License

If you think the Android project AndroidSensorApp 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 arpg.nativesensorinterface;
//w  ww.  ja v a  2 s.c om
import android.opengl.GLSurfaceView;
import javax.microedition.khronos.opengles.GL10;
import javax.microedition.khronos.egl.EGLConfig;

public class NativeOpenGLRenderer implements GLSurfaceView.Renderer {
    private native void initialize();
    private native void resize(int width, int height);
    private native void draw_frame();
    private native void finish();

    public void stop() {
        finish();
    }

    @Override
    public void onSurfaceCreated(GL10 gl, EGLConfig config) {
        initialize();
    }

    @Override
    public void onDrawFrame(GL10 gl) {
        draw_frame();
    }

    @Override
    public void onSurfaceChanged(GL10 gl, int width, int height) {
        resize(width, height);
    }
}




Java Source Code List

arpg.nativesensorinterface.MainActivity.java
arpg.nativesensorinterface.NativeCameraInterface.java
arpg.nativesensorinterface.NativeOpenGLRenderer.java
arpg.nativesensorinterface.NativeSensorInterface.java