(bind-func scale_matrix
(lambda (mat:float* x:float y:float z:float)
(let ((mat2:float* (salloc 32))
(mat3:float* (pref-ptr mat2 16)))
(pfill! mat2
x 0.0 0.0 0.0
0.0 y 0.0 0.0
0.0 0.0 z 0.0
0.0 0.0 0.0 1.0)
(mmmul mat mat2 mat3)
(memcpy (cast mat i8*) (cast mat3 i8*) (* 16 4))
void)))