In order to apply the zoom transformation to the output matrix, Weston was doing the following: • Create a temporary matrix to hold the translation • Invert the translation matrix using weston_matrix_invert into another temporary matrix • Scale that matrix by the scale factor • Multiply the current matrix with the temporary matrix Using weston_matrix_invert to invert a translation matrix is over the top. Instead we can just negate the values we pass to weston_matrix_translate. Matrix multiplication is associative so creating a temporary matrix to hold the scale and translation transform should be equivalent to just applying them directly to the output matrix.dev
parent
a69dc01a6e
commit
1e40a7ec7a
Loading…
Reference in new issue