Correctly compute the scaling factors after transformation.

Signed-off-by: Kristian Duske <kristian.duske@gmail.com>
Improve texture locking.

Signed-off-by: Kristian Duske <kristian.duske@gmail.com>