Example usage for android.opengl GLUtils getEGLErrorString

List of usage examples for android.opengl GLUtils getEGLErrorString

Introduction

In this page you can find the example usage for android.opengl GLUtils getEGLErrorString.

Prototype

public static String getEGLErrorString(int error) 

Source Link

Document

Return a string for the EGL error code, or the hex representation if the error is unknown.

Usage

From source file:Main.java

public static void checkGlError(String op) {
    int error;/* w  ww  .ja  v  a 2  s .  co m*/
    while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
        Log.e("SurfaceTest", op + ": glError " + GLUtils.getEGLErrorString(error));
    }
}

From source file:Main.java

public static void checkGlError(String glOp) {
    int error = GLES20.glGetError();
    if (GLES20.GL_NO_ERROR != error) {
        String errorStr = GLU.gluErrorString(error);
        if (null == errorStr) {
            errorStr = GLUtils.getEGLErrorString(error);
        }/*from   www. j a  v  a  2s  . c o m*/

        String msg = glOp + " caused GL error 0x" + Integer.toHexString(error) + ":" + errorStr;
        throw new GLException(error, msg);
    }
}

From source file:Main.java

public static String formatEglError(String function, int error) {
    return function + " failed: " + GLUtils.getEGLErrorString(error);
}