Example usage for javax.microedition.khronos.egl EGL10 eglWaitNative

List of usage examples for javax.microedition.khronos.egl EGL10 eglWaitNative

Introduction

In this page you can find the example usage for javax.microedition.khronos.egl EGL10 eglWaitNative.

Prototype

boolean eglWaitNative(int engine, Object bindTarget);

Source Link

Usage

From source file:uk.co.armedpineapple.cth.SDLActivity.java

public static void flipEGL() {
    try {/*from w  ww .ja v a2s . com*/
        EGL10 egl = (EGL10) EGLContext.getEGL();

        egl.eglWaitNative(EGL10.EGL_CORE_NATIVE_ENGINE, null);

        // drawing here

        egl.eglWaitGL();

        egl.eglSwapBuffers(SDLActivity.mEGLDisplay, SDLActivity.mEGLSurface);

    } catch (Exception e) {
        Log.v("SDL", "flipEGL(): " + e);
        for (StackTraceElement s : e.getStackTrace()) {
            Log.v("SDL", s.toString());
        }
    }
}