summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llmodel.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 859dcbd489..8f2f24b747 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -1414,13 +1414,19 @@ LLSD LLModel::writeModel(
U32 tc_idx = 0;
LLVector2* ftc = (LLVector2*) face.mTexCoords;
- LLVector2 min_tc = ftc[0];
- LLVector2 max_tc = min_tc;
-
- //get texture coordinate domain
- for (U32 j = 0; j < face.mNumVertices; ++j)
+ LLVector2 min_tc;
+ LLVector2 max_tc;
+
+ if (ftc)
{
- update_min_max(min_tc, max_tc, ftc[j]);
+ min_tc = ftc[0];
+ max_tc = min_tc;
+
+ //get texture coordinate domain
+ for (U32 j = 0; j < face.mNumVertices; ++j)
+ {
+ update_min_max(min_tc, max_tc, ftc[j]);
+ }
}
LLVector2 tc_range = max_tc - min_tc;
@@ -1457,8 +1463,7 @@ LLSD LLModel::writeModel(
normals[norm_idx++] = buff[1];
}
}
-
-
+
F32* src_tc = (F32*) face.mTexCoords[j].mV;
//texcoord