Huge renderer update (WIP). Still plenty to do, especially pertaining to UI.

-Nametag bubble visbility is oddly inconsistent. May vanish with future planned UI merges...
-VBOs are PAINFULLY slow on ATI hardware. This repos self-compiled davep/shining-fixes branch, so I'll leave the ball in LL's court for now regarding that.
This commit is contained in:
Shyotl
2011-12-09 14:02:29 -06:00
parent 8e7733b2ce
commit ffb285c6ff
499 changed files with 22321 additions and 12356 deletions

View File

@@ -206,18 +206,15 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mGLName(0),
mbCanSelect(TRUE),
mFlags(0),
#if MESH_ENABLED
mPhysicsShapeType(0),
mPhysicsGravity(0),
mPhysicsFriction(0),
mPhysicsDensity(0),
mPhysicsRestitution(0),
#endif //MESH_ENABLED
mDrawable(),
mCreateSelected(FALSE),
mRenderMedia(FALSE),
mBestUpdatePrecision(0),
mIsNameAttachment(false),
mText(),
mLastInterpUpdateSecs(0.f),
mLastMessageUpdateSecs(0.f),
@@ -245,14 +242,12 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mState(0),
mMedia(NULL),
mClickAction(0),
#if MESH_ENABLED
mObjectCost(0),
mLinksetCost(0),
mPhysicsCost(0),
mLinksetPhysicsCost(0.f),
mCostStale(true),
mPhysicsShapeUnknown(true),
#endif //MESH_ENABLED
mAttachmentItemID(LLUUID::null),
mLastUpdateType(OUT_UNKNOWN),
mLastUpdateCached(FALSE)
@@ -870,14 +865,13 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#ifdef DEBUG_UPDATE_TYPE
llinfos << "Full:" << getID() << llendl;
#endif
#if MESH_ENABLED
//clear cost and linkset cost
mCostStale = true;
if (isSelected())
{
gFloaterTools->dirty();
}
#endif //MESH_ENABLED
LLUUID audio_uuid;
LLUUID owner_id; // only valid if audio_uuid or particle system is not null
F32 gain;
@@ -1132,13 +1126,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
// alpha was flipped so that it zero encoded better
coloru.mV[3] = 255 - coloru.mV[3];
mText->setColor(LLColor4(coloru));
mText->setStringUTF8(temp_string);
// [RLVa:KB] - Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f
if (rlv_handler_t::isEnabled())
{
mText->setObjectText(temp_string);
}
// [/RLVa:KB]
mText->setString(temp_string);
if (mDrawable.notNull())
{
@@ -1449,15 +1437,13 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
#ifdef DEBUG_UPDATE_TYPE
llinfos << "CompFull:" << getID() << llendl;
#endif
#if MESH_ENABLED
mCostStale = true;
if (isSelected())
{
gFloaterTools->dirty();
}
#endif //MESH_ENABLED
dp->unpackU32(crc, "CRC");
mTotalCRC = crc;
dp->unpackU8(material, "Material");
@@ -1539,14 +1525,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
dp->unpackBinaryDataFixed(coloru.mV, 4, "Color");
coloru.mV[3] = 255 - coloru.mV[3];
mText->setColor(LLColor4(coloru));
mText->setStringUTF8(temp_string);
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-09 (RLVa-1.0.0f) | Added: RLVa-1.0.0f
if (rlv_handler_t::isEnabled())
{
mText->setObjectText(temp_string);
}
// [/RLVa:KB]
mText->setString(temp_string);
setChanged(TEXTURE);
}
else if(mText.notNull())
@@ -3092,7 +3071,6 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped)
}
}
#if MESH_ENABLED
void LLViewerObject::setObjectCost(F32 cost)
{
mObjectCost = cost;
@@ -3183,7 +3161,7 @@ F32 LLViewerObject::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscal
return 0.f;
}
U32 LLViewerObject::getTriangleCount() const
U32 LLViewerObject::getTriangleCount(S32* vcount) const
{
return 0;
}
@@ -3192,7 +3170,6 @@ U32 LLViewerObject::getHighLODTriangleCount()
{
return 0;
}
#endif //MESH_ENABLED
void LLViewerObject::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax)
{
@@ -3281,12 +3258,7 @@ void LLViewerObject::boostTexturePriority(BOOL boost_children /* = TRUE */)
getTEImage(i)->setBoostLevel(LLViewerTexture::BOOST_SELECTED);
}
if (isSculpted()
#if MESH_ENABLED
&& !isMesh()
#endif //MESH_ENABLED
)
if (isSculpted() && !isMesh())
{
LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT);
LLUUID sculpt_id = sculpt_params->getSculptTexture();
@@ -3526,7 +3498,6 @@ const LLVector3 LLViewerObject::getPositionEdit() const
const LLVector3 LLViewerObject::getRenderPosition() const
{
#if MESH_ENABLED
if (mDrawable.notNull() && mDrawable->isState(LLDrawable::RIGGED))
{
LLVOAvatar* avatar = getAvatar();
@@ -3535,7 +3506,7 @@ const LLVector3 LLViewerObject::getRenderPosition() const
return avatar->getPositionAgent();
}
}
#endif //MESH_ENABLED
if (mDrawable.isNull() || mDrawable->getGeneration() < 0)
{
return getPositionAgent();
@@ -3554,12 +3525,11 @@ const LLVector3 LLViewerObject::getPivotPositionAgent() const
const LLQuaternion LLViewerObject::getRenderRotation() const
{
LLQuaternion ret;
#if MESH_ENABLED
if (mDrawable.notNull() && mDrawable->isState(LLDrawable::RIGGED))
{
return ret;
}
#endif //MESH_ENABLED
if (mDrawable.isNull() || mDrawable->isStatic())
{
ret = getRotationEdit();
@@ -4502,7 +4472,7 @@ void LLViewerObject::setDebugText(const std::string &utf8text)
mText->setOnHUDAttachment(isHUDAttachment());
}
mText->setColor(LLColor4::white);
mText->setStringUTF8(utf8text);
mText->setString(utf8text);
mText->setZCompare(FALSE);
mText->setDoFade(FALSE);
updateText();
@@ -4869,12 +4839,10 @@ void LLViewerObject::adjustAudioGain(const F32 gain)
bool LLViewerObject::unpackParameterEntry(U16 param_type, LLDataPacker *dp)
{
#if MESH_ENABLED
if (LLNetworkData::PARAMS_MESH == param_type)
{
param_type = LLNetworkData::PARAMS_SCULPT;
}
#endif //MESH_ENABLED
ExtraParameter* param = getExtraParameterEntryCreate(param_type);
if (param)
{
@@ -5360,7 +5328,6 @@ void LLViewerObject::updateFlags(BOOL physics_changed)
gMessageSystem->addBOOL("IsTemporary", flagTemporaryOnRez() );
gMessageSystem->addBOOL("IsPhantom", flagPhantom() );
gMessageSystem->addBOOL("CastsShadows", flagCastShadows() );
#if MESH_ENABLED
if (physics_changed)
{
gMessageSystem->nextBlock("ExtraPhysics");
@@ -5370,7 +5337,6 @@ void LLViewerObject::updateFlags(BOOL physics_changed)
gMessageSystem->addF32("Restitution", getPhysicsRestitution() );
gMessageSystem->addF32("GravityMultiplier", getPhysicsGravity() );
}
#endif //MESH_ENABLED
gMessageSystem->sendReliable( regionp->getHost() );
}
@@ -5403,7 +5369,6 @@ BOOL LLViewerObject::setFlags(U32 flags, BOOL state)
return setit;
}
#if MESH_ENABLED
void LLViewerObject::setPhysicsShapeType(U8 type)
{
mPhysicsShapeUnknown = false;
@@ -5441,7 +5406,6 @@ U8 LLViewerObject::getPhysicsShapeType() const
return mPhysicsShapeType;
}
#endif //MESH_ENABLED
void LLViewerObject::applyAngularVelocity(F32 dt)
{
@@ -5736,7 +5700,7 @@ LLVOAvatar* LLViewerObject::getAvatar() const
return NULL;
}
#if MESH_ENABLED
class ObjectPhysicsProperties : public LLHTTPNode
{
public:
@@ -5790,4 +5754,3 @@ public:
LLHTTPRegistration<ObjectPhysicsProperties>
gHTTPRegistrationObjectPhysicsProperties("/message/ObjectPhysicsProperties");
#endif //MESH_ENABLED