2 implementations of scale_matrix:
#1
/digego/extempore/tree/v0.8.9/libs/external/opengl.xtm ·
#2
/digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
(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)))