summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive')
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/CMakeLists.txt15
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/legacy_object_types.h0
-rw-r--r--indra/llprimitive/llmaterial.cpp17
-rw-r--r--indra/llprimitive/llmaterial.h11
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmaterialtable.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmaterialtable.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmediaentry.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmediaentry.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmodel.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llmodel.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimitive.cpp139
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimitive.h32
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimlinkinfo.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimtexturelist.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llprimtexturelist.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltextureanim.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltextureanim.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltextureentry.cpp26
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltextureentry.h2
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltree_common.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltreeparams.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/lltreeparams.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llvolumemessage.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llvolumemessage.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llvolumexml.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/llvolumexml.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/material_codes.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/material_codes.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/object_flags.h0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/tests/llmediaentry_test.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/tests/llmessagesystem_stub.cpp0
-rwxr-xr-x[-rw-r--r--]indra/llprimitive/tests/llprimitive_test.cpp0
32 files changed, 145 insertions, 97 deletions
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index 4eef1673f4..0dd13916bf 100644..100755
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -14,10 +14,14 @@ include_directories(
${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
- ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS}
${LIBS_PREBUILT_DIR}/include/collada
${LIBS_PREBUILT_DIR}/include/collada/1.4
)
+include_directories(SYSTEM
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ ${LLXML_SYSTEM_INCLUDE_DIRS}
+ ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS}
+ )
set(llprimitive_SOURCE_FILES
llmaterialid.cpp
@@ -63,6 +67,15 @@ list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES})
add_library (llprimitive ${llprimitive_SOURCE_FILES})
+target_link_libraries(llprimitive
+ ${LLCOMMON_LIBRARIES}
+ ${LLMATH_LIBRARIES}
+ ${LLMESSAGE_LIBRARIES}
+ ${LLXML_LIBRARIES}
+ ${LLPHYSICSEXTENSIONS_LIBRARIES}
+ )
+
+
#add unit tests
if (LL_TESTS)
INCLUDE(LLAddBuildTest)
diff --git a/indra/llprimitive/legacy_object_types.h b/indra/llprimitive/legacy_object_types.h
index 697ad584a5..697ad584a5 100644..100755
--- a/indra/llprimitive/legacy_object_types.h
+++ b/indra/llprimitive/legacy_object_types.h
diff --git a/indra/llprimitive/llmaterial.cpp b/indra/llprimitive/llmaterial.cpp
index 1e92847b38..ce443dea1d 100644
--- a/indra/llprimitive/llmaterial.cpp
+++ b/indra/llprimitive/llmaterial.cpp
@@ -51,7 +51,7 @@
#define MATERIALS_CAP_ALPHA_MASK_CUTOFF_FIELD "AlphaMaskCutoff"
#define MATERIALS_CAP_DIFFUSE_ALPHA_MODE_FIELD "DiffuseAlphaMode"
-const LLColor4U LLMaterial::DEFAULT_SPECULAR_LIGHT_COLOR = LLColor4U::white;
+const LLColor4U LLMaterial::DEFAULT_SPECULAR_LIGHT_COLOR(255,255,255,255);
/**
* Materials constants
@@ -103,8 +103,8 @@ LLMaterial::LLMaterial()
, mSpecularRotation(.0f)
, mSpecularLightColor(LLMaterial::DEFAULT_SPECULAR_LIGHT_COLOR)
, mSpecularLightExponent(LLMaterial::DEFAULT_SPECULAR_LIGHT_EXPONENT)
- , mEnvironmentIntensity(0)
- , mDiffuseAlphaMode(0)
+ , mEnvironmentIntensity(LLMaterial::DEFAULT_ENV_INTENSITY)
+ , mDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND)
, mAlphaMaskCutoff(0)
{
}
@@ -186,12 +186,19 @@ bool LLMaterial::operator != (const LLMaterial& rhs) const
}
-U32 LLMaterial::getShaderMask()
+U32 LLMaterial::getShaderMask(U32 alpha_mode)
{ //NEVER incorporate this value into the message system -- this function will vary depending on viewer implementation
U32 ret = 0;
//two least significant bits are "diffuse alpha mode"
- ret = getDiffuseAlphaMode();
+ if (alpha_mode != DIFFUSE_ALPHA_MODE_DEFAULT)
+ {
+ ret = alpha_mode;
+ }
+ else
+ {
+ ret = getDiffuseAlphaMode();
+ }
llassert(ret < SHADER_COUNT);
diff --git a/indra/llprimitive/llmaterial.h b/indra/llprimitive/llmaterial.h
index bedfc8f8c2..b265732adc 100644
--- a/indra/llprimitive/llmaterial.h
+++ b/indra/llprimitive/llmaterial.h
@@ -44,16 +44,21 @@ public:
DIFFUSE_ALPHA_MODE_NONE = 0,
DIFFUSE_ALPHA_MODE_BLEND = 1,
DIFFUSE_ALPHA_MODE_MASK = 2,
- DIFFUSE_ALPHA_MODE_EMISSIVE = 3
+ DIFFUSE_ALPHA_MODE_EMISSIVE = 3,
+ DIFFUSE_ALPHA_MODE_DEFAULT = 4,
} eDiffuseAlphaMode;
typedef enum
{
- SHADER_COUNT = 16
+ SHADER_COUNT = 16,
+ ALPHA_SHADER_COUNT = 4
} eShaderCount;
+
+
static const U8 DEFAULT_SPECULAR_LIGHT_EXPONENT = ((U8)(0.2f * 255));
static const LLColor4U DEFAULT_SPECULAR_LIGHT_COLOR;
+ static const U8 DEFAULT_ENV_INTENSITY = 0;
LLMaterial();
LLMaterial(const LLSD& material_data);
@@ -96,7 +101,7 @@ public:
bool operator == (const LLMaterial& rhs) const;
bool operator != (const LLMaterial& rhs) const;
- U32 getShaderMask();
+ U32 getShaderMask(U32 alpha_mode = DIFFUSE_ALPHA_MODE_DEFAULT);
protected:
LLUUID mNormalID;
diff --git a/indra/llprimitive/llmaterialtable.cpp b/indra/llprimitive/llmaterialtable.cpp
index b4539ebee9..b4539ebee9 100644..100755
--- a/indra/llprimitive/llmaterialtable.cpp
+++ b/indra/llprimitive/llmaterialtable.cpp
diff --git a/indra/llprimitive/llmaterialtable.h b/indra/llprimitive/llmaterialtable.h
index a17e0103ff..a17e0103ff 100644..100755
--- a/indra/llprimitive/llmaterialtable.h
+++ b/indra/llprimitive/llmaterialtable.h
diff --git a/indra/llprimitive/llmediaentry.cpp b/indra/llprimitive/llmediaentry.cpp
index 02aba2bd83..02aba2bd83 100644..100755
--- a/indra/llprimitive/llmediaentry.cpp
+++ b/indra/llprimitive/llmediaentry.cpp
diff --git a/indra/llprimitive/llmediaentry.h b/indra/llprimitive/llmediaentry.h
index 33855b3fb2..33855b3fb2 100644..100755
--- a/indra/llprimitive/llmediaentry.h
+++ b/indra/llprimitive/llmediaentry.h
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 28ed051c55..28ed051c55 100644..100755
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 1cf528fd9f..1cf528fd9f 100644..100755
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 3f57dbe26d..2fa77177f5 100644..100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -38,6 +38,7 @@
#include "lldatapacker.h"
#include "llsdutil_math.h"
#include "llprimtexturelist.h"
+#include "imageids.h"
#include "llmaterialid.h"
/**
@@ -268,6 +269,7 @@ S32 LLPrimitive::setTEScale(const U8 index, const F32 s, const F32 t)
return mTextureList.setScale(index, s, t);
}
+
// BUG: slow - done this way because texture entries have some
// voodoo related to texture coords
S32 LLPrimitive::setTEScaleS(const U8 index, const F32 s)
@@ -313,6 +315,15 @@ S32 LLPrimitive::setTERotation(const U8 index, const F32 r)
return mTextureList.setRotation(index, r);
}
+S32 LLPrimitive::setTEMaterialID(const U8 index, const LLMaterialID& pMaterialID)
+{
+ return mTextureList.setMaterialID(index, pMaterialID);
+}
+
+S32 LLPrimitive::setTEMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams)
+{
+ return mTextureList.setMaterialParams(index, pMaterialParams);
+}
//===============================================================
S32 LLPrimitive::setTEBumpShinyFullbright(const U8 index, const U8 bump)
@@ -363,16 +374,6 @@ S32 LLPrimitive::setTEGlow(const U8 index, const F32 glow)
return mTextureList.setGlow(index, glow);
}
-S32 LLPrimitive::setTEMaterialID(const U8 index, const LLMaterialID& pMaterialID)
-{
- return mTextureList.setMaterialID(index, pMaterialID);
-}
-
-S32 LLPrimitive::setTEMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams)
-{
- return mTextureList.setMaterialParams(index, pMaterialParams);
-}
-
void LLPrimitive::setAllTESelected(bool sel)
{
for (int i = 0, cnt = getNumTEs(); i < cnt; i++)
@@ -1271,112 +1272,99 @@ BOOL LLPrimitive::packTEMessage(LLDataPacker &dp) const
return FALSE;
}
-S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name)
+S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num, LLTEContents& tec)
{
- return(unpackTEMessage(mesgsys,block_name,-1));
-}
-
-S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num)
-{
- // use a negative block_num to indicate a single-block read (a non-variable block)
S32 retval = 0;
- const U32 MAX_TES = 32;
-
- // Avoid construction of 32 UUIDs per call. JC
- static LLMaterialID material_ids[MAX_TES];
-
- U8 image_data[MAX_TES*16];
- U8 colors[MAX_TES*4];
- F32 scale_s[MAX_TES];
- F32 scale_t[MAX_TES];
- S16 offset_s[MAX_TES];
- S16 offset_t[MAX_TES];
- S16 image_rot[MAX_TES];
- U8 bump[MAX_TES];
- U8 media_flags[MAX_TES];
- U8 glow[MAX_TES];
- U8 material_data[MAX_TES*16];
-
- const U32 MAX_TE_BUFFER = 4096;
- U8 packed_buffer[MAX_TE_BUFFER];
- U8 *cur_ptr = packed_buffer;
-
- U32 size;
- U32 face_count = 0;
+ // temp buffer for material ID processing
+ // data will end up in tec.material_id[]
+ U8 material_data[LLTEContents::MAX_TES*16];
if (block_num < 0)
{
- size = mesgsys->getSizeFast(block_name, _PREHASH_TextureEntry);
+ tec.size = mesgsys->getSizeFast(block_name, _PREHASH_TextureEntry);
}
else
{
- size = mesgsys->getSizeFast(block_name, block_num, _PREHASH_TextureEntry);
+ tec.size = mesgsys->getSizeFast(block_name, block_num, _PREHASH_TextureEntry);
}
- if (size == 0)
+ if (tec.size == 0)
{
+ tec.face_count = 0;
return retval;
}
if (block_num < 0)
{
- mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, packed_buffer, 0, 0, MAX_TE_BUFFER);
+ mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, 0, LLTEContents::MAX_TE_BUFFER);
}
else
{
- mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, packed_buffer, 0, block_num, MAX_TE_BUFFER);
+ mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, block_num, LLTEContents::MAX_TE_BUFFER);
}
- face_count = getNumTEs();
+ tec.face_count = llmin((U32)getNumTEs(),(U32)LLTEContents::MAX_TES);
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)image_data, 16, face_count, MVT_LLUUID);
+ U8 *cur_ptr = tec.packed_buffer;
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.image_data, 16, tec.face_count, MVT_LLUUID);
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)colors, 4, face_count, MVT_U8);
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.colors, 4, tec.face_count, MVT_U8);
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_s, 4, face_count, MVT_F32);
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.scale_s, 4, tec.face_count, MVT_F32);
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)scale_t, 4, face_count, MVT_F32);
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.scale_t, 4, tec.face_count, MVT_F32);
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)offset_s, 2, face_count, MVT_S16Array);
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.offset_s, 2, tec.face_count, MVT_S16Array);
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)offset_t, 2, face_count, MVT_S16Array);
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.offset_t, 2, tec.face_count, MVT_S16Array);
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)image_rot, 2, face_count, MVT_S16Array);
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.image_rot, 2, tec.face_count, MVT_S16Array);
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)bump, 1, face_count, MVT_U8);
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.bump, 1, tec.face_count, MVT_U8);
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)media_flags, 1, face_count, MVT_U8);
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.media_flags, 1, tec.face_count, MVT_U8);
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)glow, 1, face_count, MVT_U8);
- if (cur_ptr < packed_buffer + size)
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.glow, 1, tec.face_count, MVT_U8);
+
+ if (cur_ptr < tec.packed_buffer + tec.size)
{
cur_ptr++;
- cur_ptr += unpackTEField(cur_ptr, packed_buffer+size, (U8 *)material_data, 16, face_count, MVT_LLUUID);
+ cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)material_data, 16, tec.face_count, MVT_LLUUID);
}
else
{
memset(material_data, 0, sizeof(material_data));
}
- for (U32 i = 0; i < face_count; i++)
+ for (U32 i = 0; i < tec.face_count; i++)
{
- material_ids[i].set(&material_data[i * 16]);
+ tec.material_ids[i].set(&material_data[i * 16]);
+ }
+
+ retval = 1;
+ return retval;
}
+S32 LLPrimitive::applyParsedTEMessage(LLTEContents& tec)
+{
+ S32 retval = 0;
+
LLColor4 color;
LLColor4U coloru;
- for (U32 i = 0; i < face_count; i++)
- {
- retval |= setTETexture(i, ((LLUUID*)image_data)[i]);
- retval |= setTEScale(i, scale_s[i], scale_t[i]);
- retval |= setTEOffset(i, (F32)offset_s[i] / (F32)0x7FFF, (F32) offset_t[i] / (F32) 0x7FFF);
- retval |= setTERotation(i, ((F32)image_rot[i] / TEXTURE_ROTATION_PACK_FACTOR) * F_TWO_PI);
- retval |= setTEBumpShinyFullbright(i, bump[i]);
- retval |= setTEMediaTexGen(i, media_flags[i]);
- retval |= setTEGlow(i, (F32)glow[i] / (F32)0xFF);
- retval |= setTEMaterialID(i, material_ids[i]);
+ for (U32 i = 0; i < tec.face_count; i++)
+ {
+ LLUUID& req_id = ((LLUUID*)tec.image_data)[i];
+ retval |= setTETexture(i, req_id);
+ retval |= setTEScale(i, tec.scale_s[i], tec.scale_t[i]);
+ retval |= setTEOffset(i, (F32)tec.offset_s[i] / (F32)0x7FFF, (F32) tec.offset_t[i] / (F32) 0x7FFF);
+ retval |= setTERotation(i, ((F32)tec.image_rot[i] / TEXTURE_ROTATION_PACK_FACTOR) * F_TWO_PI);
+ retval |= setTEBumpShinyFullbright(i, tec.bump[i]);
+ retval |= setTEMediaTexGen(i, tec.media_flags[i]);
+ retval |= setTEGlow(i, (F32)tec.glow[i] / (F32)0xFF);
- coloru = LLColor4U(colors + 4*i);
+ retval |= setTEMaterialID(i, tec.material_ids[i]);
+
+ coloru = LLColor4U(tec.colors + 4*i);
// Note: This is an optimization to send common colors (1.f, 1.f, 1.f, 1.f)
// as all zeros. However, the subtraction and addition must be done in unsigned
@@ -1393,6 +1381,15 @@ S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_nam
return retval;
}
+S32 LLPrimitive::unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num)
+{
+ LLTEContents tec;
+ S32 retval = parseTEMessage(mesgsys, block_name, block_num, tec);
+ if (!retval)
+ return retval;
+ return applyParsedTEMessage(tec);
+}
+
S32 LLPrimitive::unpackTEMessage(LLDataPacker &dp)
{
// use a negative block_num to indicate a single-block read (a non-variable block)
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index dc21af2649..47a21beaaf 100644..100755
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -290,6 +290,35 @@ public:
};
+// This code is not naming-standards compliant. Leaving it like this for
+// now to make the connection to code in
+// BOOL packTEMessage(LLDataPacker &dp) const;
+// more obvious. This should be refactored to remove the duplication, at which
+// point we can fix the names as well.
+// - Vir
+struct LLTEContents
+{
+ static const U32 MAX_TES = 32;
+
+ U8 image_data[MAX_TES*16];
+ U8 colors[MAX_TES*4];
+ F32 scale_s[MAX_TES];
+ F32 scale_t[MAX_TES];
+ S16 offset_s[MAX_TES];
+ S16 offset_t[MAX_TES];
+ S16 image_rot[MAX_TES];
+ U8 bump[MAX_TES];
+ U8 media_flags[MAX_TES];
+ U8 glow[MAX_TES];
+ LLMaterialID material_ids[MAX_TES];
+
+ static const U32 MAX_TE_BUFFER = 4096;
+ U8 packed_buffer[MAX_TE_BUFFER];
+
+ U32 size;
+ U32 face_count;
+};
+
class LLPrimitive : public LLXform
{
public:
@@ -365,9 +394,10 @@ public:
S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type);
BOOL packTEMessage(LLMessageSystem *mesgsys) const;
BOOL packTEMessage(LLDataPacker &dp) const;
- S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name);
S32 unpackTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num); // Variable num of blocks
BOOL unpackTEMessage(LLDataPacker &dp);
+ S32 parseTEMessage(LLMessageSystem* mesgsys, char const* block_name, const S32 block_num, LLTEContents& tec);
+ S32 applyParsedTEMessage(LLTEContents& tec);
#ifdef CHECK_FOR_FINITE
inline void setPosition(const LLVector3& pos);
diff --git a/indra/llprimitive/llprimlinkinfo.h b/indra/llprimitive/llprimlinkinfo.h
index 82c50cfe2f..82c50cfe2f 100644..100755
--- a/indra/llprimitive/llprimlinkinfo.h
+++ b/indra/llprimitive/llprimlinkinfo.h
diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp
index 537e7a6695..537e7a6695 100644..100755
--- a/indra/llprimitive/llprimtexturelist.cpp
+++ b/indra/llprimitive/llprimtexturelist.cpp
diff --git a/indra/llprimitive/llprimtexturelist.h b/indra/llprimitive/llprimtexturelist.h
index d7fabbbb79..d7fabbbb79 100644..100755
--- a/indra/llprimitive/llprimtexturelist.h
+++ b/indra/llprimitive/llprimtexturelist.h
diff --git a/indra/llprimitive/lltextureanim.cpp b/indra/llprimitive/lltextureanim.cpp
index 185a3f69c0..185a3f69c0 100644..100755
--- a/indra/llprimitive/lltextureanim.cpp
+++ b/indra/llprimitive/lltextureanim.cpp
diff --git a/indra/llprimitive/lltextureanim.h b/indra/llprimitive/lltextureanim.h
index f0d9f9df5c..f0d9f9df5c 100644..100755
--- a/indra/llprimitive/lltextureanim.h
+++ b/indra/llprimitive/lltextureanim.h
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index 6e5d27bb94..8365c9d7b6 100644..100755
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -91,7 +91,7 @@ LLTextureEntry::LLTextureEntry(const LLTextureEntry &rhs)
mMediaFlags = rhs.mMediaFlags;
mGlow = rhs.mGlow;
mMaterialID = rhs.mMaterialID;
-
+ mMaterial = rhs.mMaterial;
if (rhs.mMediaEntry != NULL) {
// Make a copy
mMediaEntry = new LLMediaEntry(*rhs.mMediaEntry);
@@ -113,6 +113,7 @@ LLTextureEntry &LLTextureEntry::operator=(const LLTextureEntry &rhs)
mMediaFlags = rhs.mMediaFlags;
mGlow = rhs.mGlow;
mMaterialID = rhs.mMaterialID;
+ mMaterial = rhs.mMaterial;
if (mMediaEntry != NULL) {
delete mMediaEntry;
}
@@ -549,27 +550,22 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID)
mMaterialUpdatePending = false;
mMaterialID = pMaterialID;
- if (mMaterialID.isNull())
- {
- setMaterialParams(NULL);
- }
- return TEM_CHANGE_TEXTURE;
}
- return TEM_CHANGE_NONE;
+ if (mMaterialID.isNull())
+ {
+ setMaterialParams(NULL);
+ }
+ return TEM_CHANGE_TEXTURE;
}
S32 LLTextureEntry::setMaterialParams(const LLMaterialPtr pMaterialParams)
{
- if (mMaterial != pMaterialParams)
+ if (mSelected)
{
- if (mSelected)
- {
- mMaterialUpdatePending = true;
- }
- mMaterial = pMaterialParams;
- return TEM_CHANGE_TEXTURE;
+ mMaterialUpdatePending = true;
}
- return TEM_CHANGE_NONE;
+ mMaterial = pMaterialParams;
+ return TEM_CHANGE_TEXTURE;
}
void LLTextureEntry::setMediaData(const LLMediaEntry &media_entry)
diff --git a/indra/llprimitive/lltextureentry.h b/indra/llprimitive/lltextureentry.h
index f867f45819..5cc76cfe82 100644..100755
--- a/indra/llprimitive/lltextureentry.h
+++ b/indra/llprimitive/lltextureentry.h
@@ -99,7 +99,7 @@ public:
virtual LLTextureEntry* newCopy() const;
void init(const LLUUID& tex_id, F32 scale_s, F32 scale_t, F32 offset_s, F32 offset_t, F32 rotation, U8 bump);
-
+
bool hasPendingMaterialUpdate() const { return mMaterialUpdatePending; }
bool isSelected() const { return mSelected; }
bool setSelected(bool sel) { bool prev_sel = mSelected; mSelected = sel; return prev_sel; }
diff --git a/indra/llprimitive/lltree_common.h b/indra/llprimitive/lltree_common.h
index df00ff1591..df00ff1591 100644..100755
--- a/indra/llprimitive/lltree_common.h
+++ b/indra/llprimitive/lltree_common.h
diff --git a/indra/llprimitive/lltreeparams.cpp b/indra/llprimitive/lltreeparams.cpp
index 842d848217..842d848217 100644..100755
--- a/indra/llprimitive/lltreeparams.cpp
+++ b/indra/llprimitive/lltreeparams.cpp
diff --git a/indra/llprimitive/lltreeparams.h b/indra/llprimitive/lltreeparams.h
index 6e2b47c0e9..6e2b47c0e9 100644..100755
--- a/indra/llprimitive/lltreeparams.h
+++ b/indra/llprimitive/lltreeparams.h
diff --git a/indra/llprimitive/llvolumemessage.cpp b/indra/llprimitive/llvolumemessage.cpp
index 58b23bebd2..58b23bebd2 100644..100755
--- a/indra/llprimitive/llvolumemessage.cpp
+++ b/indra/llprimitive/llvolumemessage.cpp
diff --git a/indra/llprimitive/llvolumemessage.h b/indra/llprimitive/llvolumemessage.h
index f59ee79c60..f59ee79c60 100644..100755
--- a/indra/llprimitive/llvolumemessage.h
+++ b/indra/llprimitive/llvolumemessage.h
diff --git a/indra/llprimitive/llvolumexml.cpp b/indra/llprimitive/llvolumexml.cpp
index bf2297a029..bf2297a029 100644..100755
--- a/indra/llprimitive/llvolumexml.cpp
+++ b/indra/llprimitive/llvolumexml.cpp
diff --git a/indra/llprimitive/llvolumexml.h b/indra/llprimitive/llvolumexml.h
index 9d4d989475..9d4d989475 100644..100755
--- a/indra/llprimitive/llvolumexml.h
+++ b/indra/llprimitive/llvolumexml.h
diff --git a/indra/llprimitive/material_codes.cpp b/indra/llprimitive/material_codes.cpp
index 2ea47eec36..2ea47eec36 100644..100755
--- a/indra/llprimitive/material_codes.cpp
+++ b/indra/llprimitive/material_codes.cpp
diff --git a/indra/llprimitive/material_codes.h b/indra/llprimitive/material_codes.h
index 84a6f2edd2..84a6f2edd2 100644..100755
--- a/indra/llprimitive/material_codes.h
+++ b/indra/llprimitive/material_codes.h
diff --git a/indra/llprimitive/object_flags.h b/indra/llprimitive/object_flags.h
index 31dbd15ae0..31dbd15ae0 100644..100755
--- a/indra/llprimitive/object_flags.h
+++ b/indra/llprimitive/object_flags.h
diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp
index 16e5f894e2..16e5f894e2 100644..100755
--- a/indra/llprimitive/tests/llmediaentry_test.cpp
+++ b/indra/llprimitive/tests/llmediaentry_test.cpp
diff --git a/indra/llprimitive/tests/llmessagesystem_stub.cpp b/indra/llprimitive/tests/llmessagesystem_stub.cpp
index 04e70945c4..04e70945c4 100644..100755
--- a/indra/llprimitive/tests/llmessagesystem_stub.cpp
+++ b/indra/llprimitive/tests/llmessagesystem_stub.cpp
diff --git a/indra/llprimitive/tests/llprimitive_test.cpp b/indra/llprimitive/tests/llprimitive_test.cpp
index 0d60c7cd15..0d60c7cd15 100644..100755
--- a/indra/llprimitive/tests/llprimitive_test.cpp
+++ b/indra/llprimitive/tests/llprimitive_test.cpp