addBoolUniform method

bool addBoolUniform(
  1. String name,
  2. bool val
)




**** ADD UNIFORMs

  • add BOOL

Implementation

bool addBoolUniform(String name, bool val) {
  ffi.Pointer<ffi.Bool> valT = calloc(ffi.sizeOf<ffi.Bool>());
  valT.value = val;

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