From e9cf3a680668bc038717b016fc12c3abadcdb3f4 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Tue, 2 Sep 2014 02:53:10 -0500 Subject: [PATCH] Fix tiled snapshots. Also, LLRender::genRot takes degrees, not radians. --- indra/newview/llface.cpp | 2 +- indra/newview/llviewercamera.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 6f89b5629..984aabf32 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1004,7 +1004,7 @@ void LLFace::getPlanarProjectedParams(LLQuaternion* face_rot, LLVector3* face_po F32 ang = acos(projected_binormal.mV[VY]); ang = (projected_binormal.mV[VX] < 0.f) ? -ang : ang; - gGL.genRot(ang, normal).rotate(binormal, binormal); + gGL.genRot(RAD_TO_DEG * ang, normal).rotate(binormal, binormal); LLVector4a x_axis; x_axis.setCross3(binormal, normal); diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index ba35d78d8..041e804e7 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -293,8 +293,8 @@ void LLViewerCamera::setPerspective(BOOL for_selection, int pos_y = mZoomSubregion / llceil(mZoomFactor); int pos_x = mZoomSubregion - (pos_y*llceil(mZoomFactor)); - proj_mat.applyScale_affine(mZoomFactor,mZoomFactor,1.f); proj_mat.applyTranslation_affine(offset - (F32)pos_x * 2.f, offset - (F32)pos_y * 2.f, 0.f); + proj_mat.applyScale_affine(mZoomFactor,mZoomFactor,1.f); } calcProjection(z_far); // Update the projection matrix cache