allocateInto method

  1. @override
void allocateInto(
  1. RaylibTemp temp,
  2. Pointer<MaterialC> p,
  3. String key
)
override

Writes all fields into the native struct at p, allocating nested pointers into temp under key as needed.

Called after allocatePointer to populate the zeroed memory (or reuse). For structs with no nested pointers this is typically equivalent to writeInto(p.ref).

Implementation

@override
void allocateInto(RaylibTemp temp, Pointer<MaterialC> p, String key) {
  p.ref.shader.setD(shader);

  p.ref.maps = temp.MaterialMap$.Array(maps, key: '${key}_maps');

  for (int i = 0; i < paramCount; i++) {
    p.ref.params[i] = params[i];
  }
}