Android examples for android.opengl:OpenGL Error
Checks if we've had an error inside of OpenGL ES, and if so what that error is.
//package com.java2s; import android.opengl.GLES20; import android.util.Log; public class Main { /**//from ww w .j ava 2 s . c om * Checks if we've had an error inside of OpenGL ES, and if so what that error is. * @param func */ public static void checkGLError(String aTAG, String func) { int error; while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(aTAG, func + ": glError " + error); throw new RuntimeException(func + ": glError " + error); } } }