Java tutorial
//package com.java2s; import android.opengl.GLES20; import android.opengl.GLU; import android.util.Log; public class Main { private static final String TAG = "GLES20"; public static void checkGlError(String op) { int error; while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(TAG, op + ": glError " + GLU.gluErrorString(error)); throw new RuntimeException(op + ": glError " + GLU.gluErrorString(error)); } } }