Cleanup: code comment for view3d_viewmatrix_set

This commit is contained in:
Campbell Barton 2018-01-23 17:36:51 +11:00
parent 41e930ac66
commit f6dc7a7cf3
1 changed files with 5 additions and 0 deletions

View File

@ -1191,6 +1191,11 @@ void view3d_viewmatrix_set(
vec[2] = 0.0f;
if (rect_scale) {
/* Since 'RegionView3D.winmat' has been calculated and this function doesn't take the 'ARegion'
* we don't know about the region size.
* Use 'rect_scale' when drawing a sub-region to apply 2D offset,
* scaled by the difference between the sub-region and the region size.
*/
vec[0] /= rect_scale[0];
vec[1] /= rect_scale[1];
}