Example usage for android.opengl GLException GLException

List of usage examples for android.opengl GLException GLException

Introduction

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

Prototype

public GLException(final int error, final String string) 

Source Link

Usage

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);
        }//  ww w . j a v  a  2s .  co m

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