List of usage examples for android.opengl GLES20 glGetError
public static native int glGetError();
From source file:Main.java
/** * Checks to see if a GLES error has been raised. *//*from www . j a v a 2 s. c om*/ public static void checkGlError(String op) { int error = GLES20.glGetError(); if (error != GLES20.GL_NO_ERROR) { String msg = op + ": glError 0x" + Integer.toHexString(error); Log.e(TAG, msg); throw new RuntimeException(msg); } }
From source file:com.dmitrybrant.android.cardboardmpo.MainActivity.java
private static void checkGLError(String label) { int error;//w w w. j av a2 s. co m if ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(TAG, label + ": glError " + error); throw new RuntimeException(label + ": glError " + error); } }
From source file:com.google.vrtoolkit.cardboard.samples.treasurehunt.MainActivity.java
/** * Checks if we've had an error inside of OpenGL ES, and if so what that error is. * * @param label Label to report in case of error. *//* w ww.ja v a2 s .c o m*/ private static void checkGLError(String label) { int error; while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(TAG, label + ": glError " + error); throw new RuntimeException(label + ": glError " + error); } }
From source file:com.aimfire.gallery.cardboard.PhotoActivity.java
/** * Checks if we've had an error inside of OpenGL ES, and if so what that error is. * * @param label Label to report in case of error. */// ww w.ja v a2s .co m private static void checkGLError(String label) { int error; while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { if (BuildConfig.DEBUG) Log.e(TAG, label + ": glError " + error); throw new RuntimeException(label + ": glError " + error); } }
From source file:com.sveder.cardboardpassthrough.MainActivity.java
/** * Checks if we've had an error inside of OpenGL ES, and if so what that error is. * @param func//from w w w. j av a2s .c om */ private static void checkGLError(String func) { int error; while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(TAG, func + ": glError " + error); throw new RuntimeException(func + ": glError " + error); } }
From source file:com.tumblr.cardboard.Tumblr3DActivity.java
/** * Checks if we've had an error inside of OpenGL ES, and if so what that error is. * * @param func the name of the function that was just called (for debugging) *//*from ww w .j a v a 2 s .c om*/ private static void checkGLError(String func) { int error; //noinspection LoopStatementThatDoesntLoop while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(TAG, func + ": glError " + error); throw new RuntimeException(func + ": glError " + error); } }