shared: add matrix ops for all Mat* types; redo Mat4 ops
ref2: fix parameter order in setprojectionmatrix/setmodelviewmatrix