public static boolean validateProgram(int prog) {
    if (prog == 0) {
      return false;
    }
    GLES20.glValidateProgram(prog);

    int[] status = new int[1];
    GLES20.glGetProgramiv(prog, GLES20.GL_VALIDATE_STATUS, status, 0);
    Log.e(TAG, "validate progra " + GLES20.glGetProgramInfoLog(prog));
    return status[0] != 0;
  }
Пример #2
0
  /** Validates an OpenGL program. Should only be called when developing the application. */
  public static boolean validateProgram(int programObjectId) {
    GLES20.glValidateProgram(programObjectId);
    final int[] validateStatus = new int[1];
    glGetProgramiv(programObjectId, GLES20.GL_VALIDATE_STATUS, validateStatus, 0);
    Log.v(
        TAG,
        "Results of validating program: "
            + validateStatus[0]
            + "\nLog:"
            + GLES20.glGetProgramInfoLog(programObjectId));

    return validateStatus[0] != 0;
  }
Пример #3
0
 @Override
 public void glValidateProgram(int program) {
   GLES20.glValidateProgram(program);
 }