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