(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)
;;(mmulf mat2 4 4 mat 4 4 mat3)
(mmul4 mat2 mat mat3)
(memcpy (cast mat i8*) (cast mat3 i8*) (* 16 4))
void)))