addIntUniform method

bool addIntUniform(
  1. String name,
  2. int val
)
  • add INT

Implementation

bool addIntUniform(String name, int val) {
  ffi.Pointer<ffi.Int32> valT = calloc(ffi.sizeOf<ffi.Int32>());
  valT.value = val;

  int ret = _addUniform(
    name.toNativeUtf8().cast<ffi.Char>(),
    UniformType.uniformInt.index,
    valT.cast<ffi.Void>(),
  );
  calloc.free(valT);
  return ret == 0 ? false : true;
}