本文整理汇总了Java中javax.microedition.khronos.egl.EGL10.EGL_BAD_SURFACE属性的典型用法代码示例。如果您正苦于以下问题:Java EGL10.EGL_BAD_SURFACE属性的具体用法?Java EGL10.EGL_BAD_SURFACE怎么用?Java EGL10.EGL_BAD_SURFACE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.microedition.khronos.egl.EGL10
的用法示例。
在下文中一共展示了EGL10.EGL_BAD_SURFACE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: 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);
}
}