Android examples for android.opengl:OpenGL Error
log OpenGL Error
//package com.java2s; import android.opengl.GLES20; import android.util.Log; public class Main { static String TAG = "BaseHelper"; public static void logGlError(String test) { int error = 0; while ((error = android.opengl.GLES20.glGetError()) != GLES20.GL_NO_ERROR) { switch (error) { case android.opengl.GLES20.GL_INVALID_ENUM: Log.e(TAG, test + "GL_INVALID_ENUM"); break; case GLES20.GL_INVALID_FRAMEBUFFER_OPERATION: Log.e(TAG, test + "GL_INVALID_FRAMEBUFFER_OPERATION"); break; case GLES20.GL_INVALID_VALUE: Log.e(TAG, test + "GL_INVALID_VALUE"); break; case GLES20.GL_INVALID_OPERATION: Log.e(TAG, test + "GL_INVALID_OPERATION"); break; case GLES20.GL_OUT_OF_MEMORY: Log.e(TAG, test + "GL_INVALID_OPERATION"); break; default: Log.e(TAG, test + "neznama chyba:" + error); }/*from www. j a v a2s.c o m*/ } } }