當前位置: 首頁>>代碼示例>>Java>>正文


Java EGL11.EGL_CONTEXT_LOST屬性代碼示例

本文整理匯總了Java中javax.microedition.khronos.egl.EGL11.EGL_CONTEXT_LOST屬性的典型用法代碼示例。如果您正苦於以下問題:Java EGL11.EGL_CONTEXT_LOST屬性的具體用法?Java EGL11.EGL_CONTEXT_LOST怎麽用?Java EGL11.EGL_CONTEXT_LOST使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在javax.microedition.khronos.egl.EGL11的用法示例。


在下文中一共展示了EGL11.EGL_CONTEXT_LOST屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: swap

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;
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:18,代碼來源:EGL.java

示例2: swap

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;
}
 
開發者ID:WangZhiYao,項目名稱:VideoDemo,代碼行數:18,代碼來源:EGL.java

示例3: getErrorString

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);
    }
}
 
開發者ID:nextgis,項目名稱:android_nextgis_mobile,代碼行數:37,代碼來源:MapGlView.java

示例4: swap

/**
 * 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;
}
 
開發者ID:biezhihua,項目名稱:Android_OpenGL_Demo,代碼行數:15,代碼來源:GLWallpaperService.java

示例5: eglGetErrorString

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);
    }
}
 
開發者ID:uestccokey,項目名稱:EZFilter,代碼行數:36,代碼來源:GLSurfaceView.java

示例6: swap

/**
 * 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;
}
 
開發者ID:NeoTerm,項目名稱:NeoTerm,代碼行數:15,代碼來源:GLSurfaceView_SDL.java

示例7: getErrorString

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);
    }
}
 
開發者ID:ChillingVan,項目名稱:android-openGL-canvas,代碼行數:36,代碼來源:EGLLogWrapper.java

示例8: getErrorString

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);
    }
}
 
開發者ID:godstale,項目名稱:VR-Defense-Game,代碼行數:36,代碼來源:TextureView.java

示例9: swap

/**
 * 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;
}
 
開發者ID:tgmarinho,項目名稱:apps-for-android,代碼行數:15,代碼來源:GLView.java

示例10: swap

/**
 * 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;
}
 
開發者ID:iQuick,項目名稱:NewsMe,代碼行數:32,代碼來源:GLSurfaceView.java

示例11: swap

/**
 * 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;
}
 
開發者ID:sunnygoyal,項目名稱:neon-clock-legacy,代碼行數:14,代碼來源:GLWallpaperService.java

示例12: swap

/**
 * 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;
}
 
開發者ID:chrislacy,項目名稱:AndroidLiveWallpaperHelloWorld,代碼行數:14,代碼來源:GLWallpaperService.java

示例13: getErrorString

private 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);
    }
}
 
開發者ID:basherone,項目名稱:libgdxcn,代碼行數:36,代碼來源:GLSurfaceViewAPI18.java

示例14: swap

/**
 * 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;
}
 
開發者ID:pnosalik,項目名稱:AugmentedOxford,代碼行數:15,代碼來源:ReplicaGLSurfaceView.java

示例15: swap

/**
 * Display the current render surface.
 * 
 * @return false if the context has been lost.
 */
public boolean swap() {
	this.mEgl.eglSwapBuffers(this.mEglDisplay, this.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 this.mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST;
}
 
開發者ID:liufeiit,項目名稱:itmarry,代碼行數:15,代碼來源:GLSurfaceView.java


注:本文中的javax.microedition.khronos.egl.EGL11.EGL_CONTEXT_LOST屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。