本文整理汇总了Java中android.opengl.EGL14.eglGetError方法的典型用法代码示例。如果您正苦于以下问题:Java EGL14.eglGetError方法的具体用法?Java EGL14.eglGetError怎么用?Java EGL14.eglGetError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.opengl.EGL14
的用法示例。
在下文中一共展示了EGL14.eglGetError方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeCurrent
import android.opengl.EGL14; //导入方法依赖的package包/类
/**
* change context to draw this window surface
* @return
*/
private boolean makeCurrent(final EGLSurface surface) {
// if (DEBUG) Log.v(TAG, "makeCurrent:");
if (mEglDisplay == null) {
if (DEBUG) Log.d(TAG, "makeCurrent:eglDisplay not initialized");
}
if (surface == null || surface == EGL14.EGL_NO_SURFACE) {
final int error = EGL14.eglGetError();
if (error == EGL14.EGL_BAD_NATIVE_WINDOW) {
Log.e(TAG, "makeCurrent:returned EGL_BAD_NATIVE_WINDOW.");
}
return false;
}
// attach EGL renderring context to specific EGL window surface
if (!EGL14.eglMakeCurrent(mEglDisplay, surface, surface, mEglContext)) {
Log.w(TAG, "eglMakeCurrent:" + EGL14.eglGetError());
return false;
}
return true;
}
示例2: checkEglError
import android.opengl.EGL14; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public static void checkEglError(String op) {
int error;
while ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
Lg.e( op + ": eglGetError: 0x" + Integer.toHexString(error));
throw new RuntimeException("eglGetError encountered (see log)");
}
}
示例3: checkEglError
import android.opengl.EGL14; //导入方法依赖的package包/类
private void checkEglError(String msg) {
boolean failed = false;
while (EGL14.eglGetError() != EGL14.EGL_SUCCESS) {
failed = true;
}
if (failed) {
throw new RuntimeException("EGL error encountered (see log)");
}
}
示例4: checkEglError
import android.opengl.EGL14; //导入方法依赖的package包/类
/**
* Checks for EGL errors.
*/
private void checkEglError(String msg) {
int error;
if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
}
}
示例5: swap
import android.opengl.EGL14; //导入方法依赖的package包/类
private int swap(final EGLSurface surface) {
// if (DEBUG) Log.v(TAG, "swap:");
if (!EGL14.eglSwapBuffers(mEglDisplay, surface)) {
final int err = EGL14.eglGetError();
if (DEBUG) Log.w(TAG, "swap:err=" + err);
return err;
}
return EGL14.EGL_SUCCESS;
}
示例6: checkEglError
import android.opengl.EGL14; //导入方法依赖的package包/类
/**
* Checks for EGL errors. Throws an exception if an error has been raised.
*/
private void checkEglError(String msg) {
int error;
if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
}
}
示例7: logError
import android.opengl.EGL14; //导入方法依赖的package包/类
/** Log GL-Error. */
private static void logError() {
final int error = EGL14.eglGetError();
if (error != EGL14.EGL_SUCCESS) {
if (WARNINGS) {
Log.w(TAG, android.opengl.GLUtils.getEGLErrorString(error));
}
}
}
示例8: checkEglError
import android.opengl.EGL14; //导入方法依赖的package包/类
private void checkEglError(String msg) {
boolean failed = false;
int error;
while ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
failed = true;
}
if (failed) {
throw new RuntimeException("EGL error encountered (see log)");
}
}
示例9: makeCurrent
import android.opengl.EGL14; //导入方法依赖的package包/类
/**
* Makes our EGL context current, using the supplied surface for both "draw" and "read".
*/
public void makeCurrent(EGLSurface eglSurface) {
if (mEGLDisplay == EGL14.EGL_NO_DISPLAY) {
// called makeCurrent() before create?
Log.d(TAG, "NOTE: makeCurrent w/o display");
}
if (!EGL14.eglMakeCurrent(mEGLDisplay, eglSurface, eglSurface, mEGLContext)) {
int error = EGL14.eglGetError();
throw new RuntimeException("eglMakeCurrent failed with error = " + error);
}
}
示例10: checkEglError
import android.opengl.EGL14; //导入方法依赖的package包/类
private void checkEglError(final String msg) {
int error;
if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
}
}
示例11: checkEGLError
import android.opengl.EGL14; //导入方法依赖的package包/类
private void checkEGLError(String msg) {
int error;
if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
}
}
示例12: checkEglError
import android.opengl.EGL14; //导入方法依赖的package包/类
private void checkEglError(String msg) {
int error;
if ((error = EGL14.eglGetError()) != EGL14.EGL_SUCCESS) {
throw new RuntimeException(msg + ": EGL error: 0x" + Integer.toHexString(error));
}
}