summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-01-18 14:08:21 -0700
committerXiaohong Bao <bao@lindenlab.com>2011-01-18 14:08:21 -0700
commitc602fed9b7f262d6cba713f6a282aacde6304fde (patch)
tree4fef9f7faefe5600aa2a9f6cdc8278fbe92b8ff7 /indra/newview
parentfeb5fbc66e0a4941489a7c0d92cb51341a1c4f39 (diff)
fix for SH-659: small textures not loaded
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llface.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index d22950cad3..6ba957870c 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1233,7 +1233,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
if (rebuild_tcoord)
{
LLVector2 tc = vf.mVertices[i].mTexCoord;
-
+
if (texgen != LLTextureEntry::TEX_GEN_DEFAULT)
{
LLVector3 vec = vf.mVertices[i].mPosition;
@@ -1409,7 +1409,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
mTexExtents[0].setVec(0,0);
mTexExtents[1].setVec(1,1);
xform(mTexExtents[0], cos_ang, sin_ang, os, ot, ms, mt);
- xform(mTexExtents[1], cos_ang, sin_ang, os, ot, ms, mt);
+ xform(mTexExtents[1], cos_ang, sin_ang, os, ot, ms, mt);
+
+ F32 es = vf.mTexCoordExtents[1].mV[0] - vf.mTexCoordExtents[0].mV[0] ;
+ F32 et = vf.mTexCoordExtents[1].mV[1] - vf.mTexCoordExtents[0].mV[1] ;
+ mTexExtents[0][0] *= es ;
+ mTexExtents[1][0] *= es ;
+ mTexExtents[0][1] *= et ;
+ mTexExtents[1][1] *= et ;
}
mLastVertexBuffer = mVertexBuffer;