diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-09-14 17:56:42 -0700 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-09-14 17:56:42 -0700 |
commit | ae10e78d978360871556b1cee615cd79ef381184 (patch) | |
tree | 0849232f24a8fd936601aa9d9769111781b76019 | |
parent | 42a50551b52b8d1c5208d9d34354874b73d357f9 (diff) |
Added some initial basic decoding of the material value per face.
-rwxr-xr-x | indra/llprimitive/llprimitive.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 6dee192783..40e6bedd49 100755 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1357,6 +1357,7 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) U8 bump[MAX_TES]; U8 media_flags[MAX_TES]; U8 glow[MAX_TES]; + unsigned char material_id[MAX_TES*16]; const U32 MAX_TE_BUFFER = 4096; U8 packed_buffer[MAX_TE_BUFFER]; @@ -1399,6 +1400,25 @@ S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp) cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8); cur_ptr++; cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)glow, 1, face_count, MVT_U8); + cur_ptr++; + cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)material_id, 16, face_count, MVT_LLUUID); + + for (U32 curFace = 0U; curFace < face_count; ++curFace) + { + std::string materialID(reinterpret_cast<char *>(&material_id[curFace * 16]), 16); + std::string materialIDString; + for (unsigned int i = 0U; i < 4U; ++i) + { + if (i != 0U) + { + materialIDString += "-"; + } + const U32 *value = reinterpret_cast<const U32*>(&materialID.c_str()[i * 4]); + materialIDString += llformat("%08x", *value); + } + + llinfos << "STINSON DEBUG: found material ID for face #" << curFace << " => " << materialIDString << llendl; + } for (i = 0; i < face_count; i++) { |