getActiveUniform method

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

Implementation

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

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

  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);
}