Java 类javax.microedition.khronos.egl.EGL11 实例源码

项目:TPlayer    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:QuanMinTV    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:OpenGLESRecorder    文件:GLRecoder.java   
@Override
public EGLConfig chooseConfig(EGL10 egl, EGLDisplay display) {
    int renderableType = 4;

    // The actual surface is generally RGBA or RGBX, so situationally omitting alpha
    // doesn't really help.  It can also lead to a huge performance hit on glReadPixels()
    // when reading into a GL_RGBA buffer.
    int[] attribList = {
            EGL11.EGL_RED_SIZE, 8,
            EGL11.EGL_GREEN_SIZE, 8,
            EGL11.EGL_BLUE_SIZE, 8,
            EGL11.EGL_ALPHA_SIZE, 8,
            //EGL11.EGL_DEPTH_SIZE, 16,
            //EGL11.EGL_STENCIL_SIZE, 8,
            EGL11.EGL_RENDERABLE_TYPE, renderableType,
            EGL_RECORDABLE_ANDROID, 1,      // set recordable [@-3]
            EGL11.EGL_NONE
    };
    EGLConfig[] configs = new EGLConfig[1];
    int[] numConfigs = new int[1];
    if (!egl.eglChooseConfig(display, attribList, configs, configs.length,
            numConfigs)) {
        return null;
    }
    return configs[0];
}
项目:VideoDemo    文件:EGL.java   
public boolean swap() {
    if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
        int error = mEgl.eglGetError();
        switch (error) {
            case EGL11.EGL_CONTEXT_LOST:
                return false;
            case EGL10.EGL_BAD_NATIVE_WINDOW:
                Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
                break;
            case EGL10.EGL_BAD_SURFACE:
                Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
                return false;
            default:
                throwEglException("eglSwapBuffers", error);
        }
    }
    return true;
}
项目:ListVideoViewBaseOnVitamio    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:meishiDemo    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:RxNews    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:MyHearts    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:HPlayer    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:react-native-video    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:tv    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:NetEasyNews    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:StudyMovie    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:ARDrone-Android-GEII    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:react-native-android-vitamio    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:Vitamio    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:Xamarin.Vitamio    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:BambooPlayer    文件:EGL.java   
public boolean swap() {
  if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
    int error = mEgl.eglGetError();
    switch (error) {
      case EGL11.EGL_CONTEXT_LOST:
        return false;
      case EGL10.EGL_BAD_NATIVE_WINDOW:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=" + Thread.currentThread().getId());
        break;
      case EGL10.EGL_BAD_SURFACE:
        Log.e("EglHelper", "eglSwapBuffers returned EGL_BAD_SURFACE. tid=" + Thread.currentThread().getId());
        return false;
      default:
        throwEglException("eglSwapBuffers", error);
    }
  }
  return true;
}
项目:android_nextgis_mobile    文件:MapGlView.java   
public static String getErrorString(int error)
{
    switch (error) {
        case EGL10.EGL_SUCCESS:
            return "EGL_SUCCESS";
        case EGL10.EGL_NOT_INITIALIZED:
            return "EGL_NOT_INITIALIZED";
        case EGL10.EGL_BAD_ACCESS:
            return "EGL_BAD_ACCESS";
        case EGL10.EGL_BAD_ALLOC:
            return "EGL_BAD_ALLOC";
        case EGL10.EGL_BAD_ATTRIBUTE:
            return "EGL_BAD_ATTRIBUTE";
        case EGL10.EGL_BAD_CONFIG:
            return "EGL_BAD_CONFIG";
        case EGL10.EGL_BAD_CONTEXT:
            return "EGL_BAD_CONTEXT";
        case EGL10.EGL_BAD_CURRENT_SURFACE:
            return "EGL_BAD_CURRENT_SURFACE";
        case EGL10.EGL_BAD_DISPLAY:
            return "EGL_BAD_DISPLAY";
        case EGL10.EGL_BAD_MATCH:
            return "EGL_BAD_MATCH";
        case EGL10.EGL_BAD_NATIVE_PIXMAP:
            return "EGL_BAD_NATIVE_PIXMAP";
        case EGL10.EGL_BAD_NATIVE_WINDOW:
            return "EGL_BAD_NATIVE_WINDOW";
        case EGL10.EGL_BAD_PARAMETER:
            return "EGL_BAD_PARAMETER";
        case EGL10.EGL_BAD_SURFACE:
            return "EGL_BAD_SURFACE";
        case EGL11.EGL_CONTEXT_LOST:
            return "EGL_CONTEXT_LOST";
        default:
            return getHex(error);
    }
}
项目:Android_OpenGL_Demo    文件:GLWallpaperService.java   
/**
 * Display the current render surface.
 * 
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context and all
     * associated data were lost (For instance because the device went to
     * sleep). We need to sleep until we get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:Android_OpenGL_Demo    文件:GLWallpaperService.java   
/**
 * Display the current render surface.
 * 
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context and all
     * associated data were lost (For instance because the device went to
     * sleep). We need to sleep until we get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:EZFilter    文件:GLSurfaceView.java   
static String eglGetErrorString(int error) {
    switch (error) {
        case EGL11.EGL_SUCCESS:
            return "EGL_SUCCESS";
        case EGL11.EGL_NOT_INITIALIZED:
            return "EGL_NOT_INITIALIZED";
        case EGL11.EGL_BAD_ACCESS:
            return "EGL_BAD_ACCESS";
        case EGL11.EGL_BAD_ALLOC:
            return "EGL_BAD_ALLOC";
        case EGL11.EGL_BAD_ATTRIBUTE:
            return "EGL_BAD_ATTRIBUTE";
        case EGL11.EGL_BAD_CONFIG:
            return "EGL_BAD_CONFIG";
        case EGL11.EGL_BAD_CONTEXT:
            return "EGL_BAD_CONTEXT";
        case EGL11.EGL_BAD_CURRENT_SURFACE:
            return "EGL_BAD_CURRENT_SURFACE";
        case EGL11.EGL_BAD_DISPLAY:
            return "EGL_BAD_DISPLAY";
        case EGL11.EGL_BAD_MATCH:
            return "EGL_BAD_MATCH";
        case EGL11.EGL_BAD_NATIVE_PIXMAP:
            return "EGL_BAD_NATIVE_PIXMAP";
        case EGL11.EGL_BAD_NATIVE_WINDOW:
            return "EGL_BAD_NATIVE_WINDOW";
        case EGL11.EGL_BAD_PARAMETER:
            return "EGL_BAD_PARAMETER";
        case EGL11.EGL_BAD_SURFACE:
            return "EGL_BAD_SURFACE";
        case EGL11.EGL_CONTEXT_LOST:
            return "EGL_CONTEXT_LOST";
        default:
            return "0x" + Integer.toHexString(error);
    }
}
项目:EZFilter    文件:GLTextureView.java   
static String eglGetErrorString(int error) {
    switch (error) {
        case EGL11.EGL_SUCCESS:
            return "EGL_SUCCESS";
        case EGL11.EGL_NOT_INITIALIZED:
            return "EGL_NOT_INITIALIZED";
        case EGL11.EGL_BAD_ACCESS:
            return "EGL_BAD_ACCESS";
        case EGL11.EGL_BAD_ALLOC:
            return "EGL_BAD_ALLOC";
        case EGL11.EGL_BAD_ATTRIBUTE:
            return "EGL_BAD_ATTRIBUTE";
        case EGL11.EGL_BAD_CONFIG:
            return "EGL_BAD_CONFIG";
        case EGL11.EGL_BAD_CONTEXT:
            return "EGL_BAD_CONTEXT";
        case EGL11.EGL_BAD_CURRENT_SURFACE:
            return "EGL_BAD_CURRENT_SURFACE";
        case EGL11.EGL_BAD_DISPLAY:
            return "EGL_BAD_DISPLAY";
        case EGL11.EGL_BAD_MATCH:
            return "EGL_BAD_MATCH";
        case EGL11.EGL_BAD_NATIVE_PIXMAP:
            return "EGL_BAD_NATIVE_PIXMAP";
        case EGL11.EGL_BAD_NATIVE_WINDOW:
            return "EGL_BAD_NATIVE_WINDOW";
        case EGL11.EGL_BAD_PARAMETER:
            return "EGL_BAD_PARAMETER";
        case EGL11.EGL_BAD_SURFACE:
            return "EGL_BAD_SURFACE";
        case EGL11.EGL_CONTEXT_LOST:
            return "EGL_CONTEXT_LOST";
        default:
            return "0x" + Integer.toHexString(error);
    }
}
项目:NeoTerm    文件:GLSurfaceView_SDL.java   
/**
 * Display the current render surface.
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context
     * and all associated data were lost (For instance because
     * the device went to sleep). We need to sleep until we
     * get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:android-openGL-canvas    文件:EGLLogWrapper.java   
public static String getErrorString(int error) {
    switch (error) {
        case EGL_SUCCESS:
            return "EGL_SUCCESS";
        case EGL_NOT_INITIALIZED:
            return "EGL_NOT_INITIALIZED";
        case EGL_BAD_ACCESS:
            return "EGL_BAD_ACCESS";
        case EGL_BAD_ALLOC:
            return "EGL_BAD_ALLOC";
        case EGL_BAD_ATTRIBUTE:
            return "EGL_BAD_ATTRIBUTE";
        case EGL_BAD_CONFIG:
            return "EGL_BAD_CONFIG";
        case EGL_BAD_CONTEXT:
            return "EGL_BAD_CONTEXT";
        case EGL_BAD_CURRENT_SURFACE:
            return "EGL_BAD_CURRENT_SURFACE";
        case EGL_BAD_DISPLAY:
            return "EGL_BAD_DISPLAY";
        case EGL_BAD_MATCH:
            return "EGL_BAD_MATCH";
        case EGL_BAD_NATIVE_PIXMAP:
            return "EGL_BAD_NATIVE_PIXMAP";
        case EGL_BAD_NATIVE_WINDOW:
            return "EGL_BAD_NATIVE_WINDOW";
        case EGL_BAD_PARAMETER:
            return "EGL_BAD_PARAMETER";
        case EGL_BAD_SURFACE:
            return "EGL_BAD_SURFACE";
        case EGL11.EGL_CONTEXT_LOST:
            return "EGL_CONTEXT_LOST";
        default:
            return getHex(error);
    }
}
项目:apps-for-android    文件:GLView.java   
/**
 * Display the current render surface.
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context
     * and all associated data were lost (For instance because
     * the device went to sleep). We need to sleep until we
     * get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:apps-for-android    文件:GLView.java   
/**
 * Display the current render surface.
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context
     * and all associated data were lost (For instance because
     * the device went to sleep). We need to sleep until we
     * get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:apps-for-android    文件:GLSurfaceView.java   
/**
 * Display the current render surface.
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context
     * and all associated data were lost (For instance because
     * the device went to sleep). We need to sleep until we
     * get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:NewsMe    文件:GLSurfaceView.java   
/**
 * Display the current render surface.
 * 
 * @return false if the context has been lost.
 */
public boolean swap() {
    if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {

        /*
         * Check for EGL_CONTEXT_LOST, which means the context and all
         * associated data were lost (For instance because the device
         * went to sleep). We need to sleep until we get a new surface.
         */
        int error = mEgl.eglGetError();
        switch (error) {
        case EGL11.EGL_CONTEXT_LOST:
            return false;
        case EGL10.EGL_BAD_NATIVE_WINDOW:
            // The native window is bad, probably because the
            // window manager has closed it. Ignore this error,
            // on the expectation that the application will be
            // closed soon.
            Log.e("EglHelper",
                    "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid="
                            + Thread.currentThread().getId());
            break;
        default:
            throwEglException("eglSwapBuffers", error);
        }
    }
    return true;
}
项目:android_gl_viewer    文件:MapGlView.java   
public static String getErrorString(int error)
{
    switch (error) {
        case EGL10.EGL_SUCCESS:
            return "EGL_SUCCESS";
        case EGL10.EGL_NOT_INITIALIZED:
            return "EGL_NOT_INITIALIZED";
        case EGL10.EGL_BAD_ACCESS:
            return "EGL_BAD_ACCESS";
        case EGL10.EGL_BAD_ALLOC:
            return "EGL_BAD_ALLOC";
        case EGL10.EGL_BAD_ATTRIBUTE:
            return "EGL_BAD_ATTRIBUTE";
        case EGL10.EGL_BAD_CONFIG:
            return "EGL_BAD_CONFIG";
        case EGL10.EGL_BAD_CONTEXT:
            return "EGL_BAD_CONTEXT";
        case EGL10.EGL_BAD_CURRENT_SURFACE:
            return "EGL_BAD_CURRENT_SURFACE";
        case EGL10.EGL_BAD_DISPLAY:
            return "EGL_BAD_DISPLAY";
        case EGL10.EGL_BAD_MATCH:
            return "EGL_BAD_MATCH";
        case EGL10.EGL_BAD_NATIVE_PIXMAP:
            return "EGL_BAD_NATIVE_PIXMAP";
        case EGL10.EGL_BAD_NATIVE_WINDOW:
            return "EGL_BAD_NATIVE_WINDOW";
        case EGL10.EGL_BAD_PARAMETER:
            return "EGL_BAD_PARAMETER";
        case EGL10.EGL_BAD_SURFACE:
            return "EGL_BAD_SURFACE";
        case EGL11.EGL_CONTEXT_LOST:
            return "EGL_CONTEXT_LOST";
        default:
            return getHex(error);
    }
}
项目:SinaVideoSdkDemo    文件:GLSurfaceView.java   
/**
 * Display the current render surface.
 * 
 * @return false if the context has been lost.
 */
public boolean swap() {
    if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {

        /*
         * Check for EGL_CONTEXT_LOST, which means the context and all
         * associated data were lost (For instance because the device
         * went to sleep). We need to sleep until we get a new surface.
         */
        int error = mEgl.eglGetError();
        switch (error) {
        case EGL11.EGL_CONTEXT_LOST:
            return false;
        case EGL10.EGL_BAD_NATIVE_WINDOW:
            // The native window is bad, probably because the
            // window manager has closed it. Ignore this error,
            // on the expectation that the application will be
            // closed soon.
            Log.e("EglHelper",
                    "eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid="
                            + Thread.currentThread().getId());
            break;
        default:
            throwEglException("eglSwapBuffers", error);
        }
    }
    return true;
}
项目:android_nextgis_mobile    文件:MapGlView.java   
public static String getErrorString(int error)
{
    switch (error) {
        case EGL10.EGL_SUCCESS:
            return "EGL_SUCCESS";
        case EGL10.EGL_NOT_INITIALIZED:
            return "EGL_NOT_INITIALIZED";
        case EGL10.EGL_BAD_ACCESS:
            return "EGL_BAD_ACCESS";
        case EGL10.EGL_BAD_ALLOC:
            return "EGL_BAD_ALLOC";
        case EGL10.EGL_BAD_ATTRIBUTE:
            return "EGL_BAD_ATTRIBUTE";
        case EGL10.EGL_BAD_CONFIG:
            return "EGL_BAD_CONFIG";
        case EGL10.EGL_BAD_CONTEXT:
            return "EGL_BAD_CONTEXT";
        case EGL10.EGL_BAD_CURRENT_SURFACE:
            return "EGL_BAD_CURRENT_SURFACE";
        case EGL10.EGL_BAD_DISPLAY:
            return "EGL_BAD_DISPLAY";
        case EGL10.EGL_BAD_MATCH:
            return "EGL_BAD_MATCH";
        case EGL10.EGL_BAD_NATIVE_PIXMAP:
            return "EGL_BAD_NATIVE_PIXMAP";
        case EGL10.EGL_BAD_NATIVE_WINDOW:
            return "EGL_BAD_NATIVE_WINDOW";
        case EGL10.EGL_BAD_PARAMETER:
            return "EGL_BAD_PARAMETER";
        case EGL10.EGL_BAD_SURFACE:
            return "EGL_BAD_SURFACE";
        case EGL11.EGL_CONTEXT_LOST:
            return "EGL_CONTEXT_LOST";
        default:
            return getHex(error);
    }
}
项目:replicaisland    文件:GLSurfaceView.java   
/**
 * Display the current render surface.
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context
     * and all associated data were lost (For instance because
     * the device went to sleep). We need to sleep until we
     * get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:360-Video-Player-for-Android    文件:RajawaliTextureView.java   
public static String getErrorString(int error) {
    switch (error) {
        case EGL10.EGL_SUCCESS:
            return "EGL_SUCCESS";
        case EGL10.EGL_NOT_INITIALIZED:
            return "EGL_NOT_INITIALIZED";
        case EGL10.EGL_BAD_ACCESS:
            return "EGL_BAD_ACCESS";
        case EGL10.EGL_BAD_ALLOC:
            return "EGL_BAD_ALLOC";
        case EGL10.EGL_BAD_ATTRIBUTE:
            return "EGL_BAD_ATTRIBUTE";
        case EGL10.EGL_BAD_CONFIG:
            return "EGL_BAD_CONFIG";
        case EGL10.EGL_BAD_CONTEXT:
            return "EGL_BAD_CONTEXT";
        case EGL10.EGL_BAD_CURRENT_SURFACE:
            return "EGL_BAD_CURRENT_SURFACE";
        case EGL10.EGL_BAD_DISPLAY:
            return "EGL_BAD_DISPLAY";
        case EGL10.EGL_BAD_MATCH:
            return "EGL_BAD_MATCH";
        case EGL10.EGL_BAD_NATIVE_PIXMAP:
            return "EGL_BAD_NATIVE_PIXMAP";
        case EGL10.EGL_BAD_NATIVE_WINDOW:
            return "EGL_BAD_NATIVE_WINDOW";
        case EGL10.EGL_BAD_PARAMETER:
            return "EGL_BAD_PARAMETER";
        case EGL10.EGL_BAD_SURFACE:
            return "EGL_BAD_SURFACE";
        case EGL11.EGL_CONTEXT_LOST:
            return "EGL_CONTEXT_LOST";
        default:
            return "0x" + Integer.toHexString(error).toUpperCase(Locale.US);
    }
}
项目:VR-Defense-Game    文件:TextureView.java   
public static String getErrorString(int error) {
    switch (error) {
        case EGL10.EGL_SUCCESS:
            return "EGL_SUCCESS";
        case EGL10.EGL_NOT_INITIALIZED:
            return "EGL_NOT_INITIALIZED";
        case EGL10.EGL_BAD_ACCESS:
            return "EGL_BAD_ACCESS";
        case EGL10.EGL_BAD_ALLOC:
            return "EGL_BAD_ALLOC";
        case EGL10.EGL_BAD_ATTRIBUTE:
            return "EGL_BAD_ATTRIBUTE";
        case EGL10.EGL_BAD_CONFIG:
            return "EGL_BAD_CONFIG";
        case EGL10.EGL_BAD_CONTEXT:
            return "EGL_BAD_CONTEXT";
        case EGL10.EGL_BAD_CURRENT_SURFACE:
            return "EGL_BAD_CURRENT_SURFACE";
        case EGL10.EGL_BAD_DISPLAY:
            return "EGL_BAD_DISPLAY";
        case EGL10.EGL_BAD_MATCH:
            return "EGL_BAD_MATCH";
        case EGL10.EGL_BAD_NATIVE_PIXMAP:
            return "EGL_BAD_NATIVE_PIXMAP";
        case EGL10.EGL_BAD_NATIVE_WINDOW:
            return "EGL_BAD_NATIVE_WINDOW";
        case EGL10.EGL_BAD_PARAMETER:
            return "EGL_BAD_PARAMETER";
        case EGL10.EGL_BAD_SURFACE:
            return "EGL_BAD_SURFACE";
        case EGL11.EGL_CONTEXT_LOST:
            return "EGL_CONTEXT_LOST";
        default:
            return "0x" + Integer.toHexString(error).toUpperCase(Locale.US);
    }
}
项目:vsiogap3d    文件:GLSurfaceView.java   
/**
 * Display the current render surface.
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context
     * and all associated data were lost (For instance because
     * the device went to sleep). We need to sleep until we
     * get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:neon-clock-legacy    文件:GLWallpaperService.java   
/**
 * Display the current render surface.
 *
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context and all associated data were lost (For instance
     * because the device went to sleep). We need to sleep until we get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:AndroidLiveWallpaperHelloWorld    文件:GLWallpaperService.java   
/**
 * Display the current render surface.
 *
 * @return false if the context has been lost.
 */
public boolean swap() {
        mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

        /*
         * Always check for EGL_CONTEXT_LOST, which means the context and all associated data were lost (For instance
         * because the device went to sleep). We need to sleep until we get a new surface.
         */
        return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:platform-external-replicaisland    文件:GLSurfaceView.java   
/**
 * Display the current render surface.
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context
     * and all associated data were lost (For instance because
     * the device went to sleep). We need to sleep until we
     * get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
项目:neon-clock-gl    文件:GLWallpaperService.java   
/**
 * Display the current render surface.
 *
 * @return false if the context has been lost.
 */
public boolean swap() {
    mEgl.eglSwapBuffers(mEglDisplay, mEglSurface);

    /*
     * Always check for EGL_CONTEXT_LOST, which means the context and all associated data were lost (For instance
     * because the device went to sleep). We need to sleep until we get a new surface.
     */
    return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}