getProgramInfoLog method

String? getProgramInfoLog(
  1. Program program
)

Implementation

String? getProgramInfoLog(Program program){
  startCheck('getProgramInfoLog');
  var infoLen = calloc<Int32>();

  gl.glGetProgramiv(program.id, 35716, infoLen);

  int _len = infoLen.value;
  calloc.free(infoLen);

  String message = '';

  if (_len > 0) {
    final infoLog = calloc<Int8>(_len);
    gl.glGetProgramInfoLog(program.id, _len, nullptr, infoLog);
    checkError('getProgramInfoLog');
    message = "\nError compiling shader:\n${infoLog.cast<Utf8>().toDartString()}";
    calloc.free(infoLog);
    return message;
  }

  return null;
}