check OpenGL Error - Android android.opengl

Android examples for android.opengl:OpenGL Error

Description

check OpenGL Error

Demo Code

import android.opengl.GLES20;
import android.util.Log;

public class Main {

  private static final String TAG = "GraphicUtils";
  private static int mCurrentProgram;

  public static void checkGlError(String op) {
    int error;//from  w  ww.ja  va2s.  c o  m
    while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) {
      String errorMessage = GLES20.glGetProgramInfoLog(mCurrentProgram);
      Log.e(TAG, op + ": glError " + error + " " + errorMessage);

    }
  }

}

Related Tutorials