Example usage for android.opengl GLES20 GL_NO_ERROR

List of usage examples for android.opengl GLES20 GL_NO_ERROR

Introduction

In this page you can find the example usage for android.opengl GLES20 GL_NO_ERROR.

Prototype

int GL_NO_ERROR

To view the source code for android.opengl GLES20 GL_NO_ERROR.

Click Source Link

Usage

From source file:com.dmitrybrant.android.cardboardmpo.MainActivity.java

private static void checkGLError(String label) {
    int error;/*  w  w w.  j a  va 2 s . c  o  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.  j av a2s  .co  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.
 *///from   ww  w  .jav  a  2  s . com
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  a v  a 2 s.c o  m*/
 */
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)
 *//* www  .  j ava 2s  . c  o  m*/
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);
    }
}