diff --git a/indra/llrender/llcubemap.cpp b/indra/llrender/llcubemap.cpp index 03291018e..395b2af02 100644 --- a/indra/llrender/llcubemap.cpp +++ b/indra/llrender/llcubemap.cpp @@ -266,14 +266,8 @@ void LLCubeMap::setMatrix(S32 stage) gGL.getTexUnit(stage)->activate(); } - LLVector3 x(gGLModelView.getRow<0>().getF32ptr()); - LLVector3 y(gGLModelView.getRow<1>().getF32ptr()); - LLVector3 z(gGLModelView.getRow<2>().getF32ptr()); - - LLMatrix3 mat3; - mat3.setRows(x,y,z); - LLMatrix4a trans; - trans.loadu(mat3); + LLMatrix4a trans(gGLModelView); + trans.setRow<3>(LLVector4a::getZero()); trans.transpose(); gGL.matrixMode(LLRender::MM_TEXTURE);