本文整理匯總了Java中javax.microedition.khronos.egl.EGL10.EGL_SUCCESS屬性的典型用法代碼示例。如果您正苦於以下問題:Java EGL10.EGL_SUCCESS屬性的具體用法?Java EGL10.EGL_SUCCESS怎麽用?Java EGL10.EGL_SUCCESS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類javax.microedition.khronos.egl.EGL10
的用法示例。
在下文中一共展示了EGL10.EGL_SUCCESS屬性的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: throwEglException
public static void throwEglException(
EGL10 egl,
String function)
{
int error;
StringBuilder sb = new StringBuilder();
while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
sb.append(getErrorString(error)).append("\n");
}
String message = function + " failed";
if (sb.length() > 0) {
message += ": " + sb.toString();
}
Log.e(ConstantsUI.TAG, message);
throw new RuntimeException(message);
}
示例2: swap
/**
* Display the current render surface.
* @return the EGL error code from eglSwapBuffers.
*/
public int swap() {
if (! mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
return mEgl.eglGetError();
}
return EGL10.EGL_SUCCESS;
}
示例3: checkEglError
protected void checkEglError(
EGL10 egl,
String prompt)
{
int error;
while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
Log.e(ConstantsUI.TAG, String.format("%s: EGL error: %s", prompt, getErrorString(error)));
}
}
示例4: 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);
}
}
示例5: swap
/**
* Display the current render surface.
*
* @return the EGL error code from eglSwapBuffers.
*/
public int swap() {
if (!mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {
return mEgl.eglGetError();
}
return EGL10.EGL_SUCCESS;
}
示例6: checkEglError
private void checkEglError(String msg) {
if (mEGL.eglGetError() != EGL10.EGL_SUCCESS) {
throw new RuntimeException("EGL error encountered (see log)");
}
}
示例7: checkEglError
private static void checkEglError(String prompt, EGL10 egl) {
int error;
while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
Log.e(TAG, String.format("%s: EGL error: 0x%x", prompt, error));
}
}
示例8: checkEglError
private static void checkEglError(String prompt, EGL10 egl) {
int error;
while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
Log.d(LOG_TAG, String.format(Locale.US, "%s: EGL error: 0x%x", prompt, error));
}
}