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

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

Introduction

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

Prototype

boolean eglWaitGL();

Source Link

Usage

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

public static void flipEGL() {
    try {//  w  ww.  ja va2  s . 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());
        }
    }
}