getActiveUniform method

ActiveInfo getActiveUniform(
  1. int program,
  2. int index
)

Implementation

ActiveInfo getActiveUniform(int program, int index) {
  Pointer<Int32> length = calloc<Int32>();
  Pointer<Int32> size = calloc<Int32>();
  Pointer<Uint32> type = calloc<Uint32>();
  Pointer<Int8> name = calloc<Int8>(100);

  gl.glGetActiveUniform(program, index, 99, length, size, type, name);

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