getActiveAttrib method

ActiveInfo getActiveAttrib(
  1. Program v0,
  2. int v1
)

Implementation

ActiveInfo getActiveAttrib(Program v0, int v1) {
  startCheck('getActiveAttrib');
  var length = calloc<Int32>();
  var size = calloc<Int32>();
  var type = calloc<Uint32>();
  var name = calloc<Int8>(100);

  gl.glGetActiveAttrib(v0.id, v1, 99, length, size, type, name);
  checkError('getActiveAttrib');

  int _type = type.value;
  String _name = name.cast<Utf8>().toDartString();
  int _size = size.value;

  calloc.free(type);
  calloc.free(name);
  calloc.free(size);
  calloc.free(length);

  return ActiveInfo(_type, _name, _size);
}