diff options
author | Dave Parks <davep@lindenlab.com> | 2011-06-20 18:56:49 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-06-20 18:56:49 -0500 |
commit | 226bf6db06ee3d3703a39a5cd5a7ed5776796e55 (patch) | |
tree | 74766add425c318cf38aa14a4ab69f47fe691166 | |
parent | 08fd82ef8f654f62fb1d6b12c5694edd3ef8d55c (diff) | |
parent | ce02ed3118a8a84df9bcbf39b4a5531e5c698561 (diff) |
merge
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 21 |
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 |