getShaderInfoLog method

dynamic getShaderInfoLog(
  1. dynamic v0
)

Implementation

getShaderInfoLog(v0) {
  final infoLen = calloc<Int32>();
  glGetShaderiv(v0, INFO_LOG_LENGTH, infoLen);

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

  String message = '';
  if (infoLen.value > 1) {
    final infoLog = calloc<Int8>(_len);

    glGetShaderInfoLog(v0, _len, nullptr, infoLog);
    message =
        "\nError compiling shader:\n${infoLog.cast<Utf8>().toDartString()}";

    calloc.free(infoLog);
    return message;
  }
}