vector3 method

void vector3(
  1. int offset,
  2. Vector3 v, [
  3. double w = 0
])

Writes v as a vec4 with w at offset. Uniform blocks pad a vec3 to 16 bytes anyway, so blocks declare vec4s and this fills one.

Implementation

void vector3(int offset, Vector3 v, [double w = 0]) =>
    vec4(offset, v.x, v.y, v.z, w);