MAINT-775, MAINT-1022 Regression cleanup.
parent
0249a0d1e7
commit
7a20b5be78
|
|
@ -551,8 +551,6 @@ F32 LLDrawable::updateXform(BOOL undamped)
|
|||
|
||||
LLVector3 vec = mCurrentScale-target_scale;
|
||||
|
||||
|
||||
|
||||
if (vec*vec > MIN_INTERPOLATE_DISTANCE_SQUARED)
|
||||
{ //scale change requires immediate rebuild
|
||||
mCurrentScale = target_scale;
|
||||
|
|
@ -560,18 +558,14 @@ F32 LLDrawable::updateXform(BOOL undamped)
|
|||
}
|
||||
else if (!isRoot() &&
|
||||
(!mVObjp->getAngularVelocity().isExactlyZero() ||
|
||||
target_pos != mXform.getPosition() ||
|
||||
target_rot != mXform.getRotation()))
|
||||
dist_squared > 0.f))
|
||||
{ //child prim moving relative to parent, tag as needing to be rendered atomically and rebuild
|
||||
dist_squared = 1.f; //keep this object on the move list
|
||||
if (!isState(LLDrawable::ANIMATED_CHILD))
|
||||
{
|
||||
{
|
||||
setState(LLDrawable::ANIMATED_CHILD);
|
||||
gPipeline.markRebuild(this, LLDrawable::REBUILD_ALL, TRUE);
|
||||
LLSpatialGroup* group = getSpatialGroup();
|
||||
if (group)
|
||||
{
|
||||
gPipeline.markRebuild(group, TRUE);
|
||||
}
|
||||
mVObjp->dirtySpatialGroup();
|
||||
}
|
||||
}
|
||||
else if (!getVOVolume() && !isAvatar())
|
||||
|
|
|
|||
|
|
@ -818,15 +818,17 @@ LLQuaternion LLVolumeImplFlexible::getEndRotation()
|
|||
}//------------------------------------------------------------------
|
||||
|
||||
|
||||
void LLVolumeImplFlexible::updateRelativeXform()
|
||||
void LLVolumeImplFlexible::updateRelativeXform(bool force_identity)
|
||||
{
|
||||
LLQuaternion delta_rot;
|
||||
LLVector3 delta_pos, delta_scale;
|
||||
LLVOVolume* vo = (LLVOVolume*) mVO;
|
||||
|
||||
bool use_identity = vo->mDrawable->isSpatialRoot() || force_identity;
|
||||
|
||||
//matrix from local space to parent relative/global space
|
||||
delta_rot = vo->mDrawable->isSpatialRoot() ? LLQuaternion() : vo->mDrawable->getRotation();
|
||||
delta_pos = vo->mDrawable->isSpatialRoot() ? LLVector3(0,0,0) : vo->mDrawable->getPosition();
|
||||
delta_rot = use_identity ? LLQuaternion() : vo->mDrawable->getRotation();
|
||||
delta_pos = use_identity ? LLVector3(0,0,0) : vo->mDrawable->getPosition();
|
||||
delta_scale = LLVector3(1,1,1);
|
||||
|
||||
// Vertex transform (4x4)
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class LLVolumeImplFlexible : public LLVolumeInterface
|
|||
bool isVolumeGlobal() const { return true; }
|
||||
bool isActive() const { return true; }
|
||||
const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const;
|
||||
void updateRelativeXform();
|
||||
void updateRelativeXform(bool force_identity);
|
||||
void doFlexibleUpdate(); // Called to update the simulation
|
||||
void doFlexibleRebuild(); // Called to rebuild the geometry
|
||||
void preRebuild();
|
||||
|
|
|
|||
|
|
@ -699,6 +699,9 @@ void LLSpatialGroup::rebuildMesh()
|
|||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt");
|
||||
static LLFastTimer::DeclareTimer FTM_ADD_GEOMETRY_COUNT("Add Geometry");
|
||||
static LLFastTimer::DeclareTimer FTM_CREATE_VB("Create VB");
|
||||
static LLFastTimer::DeclareTimer FTM_GET_GEOMETRY("Get Geometry");
|
||||
|
||||
void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
|
||||
{
|
||||
|
|
@ -720,27 +723,36 @@ void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group)
|
|||
//get geometry count
|
||||
U32 index_count = 0;
|
||||
U32 vertex_count = 0;
|
||||
|
||||
addGeometryCount(group, vertex_count, index_count);
|
||||
|
||||
{
|
||||
LLFastTimer t(FTM_ADD_GEOMETRY_COUNT);
|
||||
addGeometryCount(group, vertex_count, index_count);
|
||||
}
|
||||
|
||||
if (vertex_count > 0 && index_count > 0)
|
||||
{ //create vertex buffer containing volume geometry for this node
|
||||
group->mBuilt = 1.f;
|
||||
if (group->mVertexBuffer.isNull() ||
|
||||
!group->mVertexBuffer->isWriteable() ||
|
||||
(group->mBufferUsage != group->mVertexBuffer->getUsage() && LLVertexBuffer::sEnableVBOs))
|
||||
{
|
||||
group->mVertexBuffer = createVertexBuffer(mVertexDataMask, group->mBufferUsage);
|
||||
group->mVertexBuffer->allocateBuffer(vertex_count, index_count, true);
|
||||
stop_glerror();
|
||||
LLFastTimer t(FTM_CREATE_VB);
|
||||
group->mBuilt = 1.f;
|
||||
if (group->mVertexBuffer.isNull() ||
|
||||
!group->mVertexBuffer->isWriteable() ||
|
||||
(group->mBufferUsage != group->mVertexBuffer->getUsage() && LLVertexBuffer::sEnableVBOs))
|
||||
{
|
||||
group->mVertexBuffer = createVertexBuffer(mVertexDataMask, group->mBufferUsage);
|
||||
group->mVertexBuffer->allocateBuffer(vertex_count, index_count, true);
|
||||
stop_glerror();
|
||||
}
|
||||
else
|
||||
{
|
||||
group->mVertexBuffer->resizeBuffer(vertex_count, index_count);
|
||||
stop_glerror();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
{
|
||||
group->mVertexBuffer->resizeBuffer(vertex_count, index_count);
|
||||
stop_glerror();
|
||||
LLFastTimer t(FTM_GET_GEOMETRY);
|
||||
getGeometry(group);
|
||||
}
|
||||
|
||||
getGeometry(group);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -684,7 +684,7 @@ void LLVOVolume::updateTextures()
|
|||
{
|
||||
updateTextureVirtualSize();
|
||||
|
||||
/*if (mDrawable.notNull() && !isVisible() && !mDrawable->isActive())
|
||||
if (mDrawable.notNull() && !isVisible() && !mDrawable->isActive())
|
||||
{ //delete vertex buffer to free up some VRAM
|
||||
LLSpatialGroup* group = mDrawable->getSpatialGroup();
|
||||
if (group)
|
||||
|
|
@ -695,7 +695,7 @@ void LLVOVolume::updateTextures()
|
|||
//it becomes visible
|
||||
group->setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::MESH_DIRTY | LLSpatialGroup::NEW_DRAWINFO);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1497,7 +1497,7 @@ void LLVOVolume::updateRelativeXform(bool force_identity)
|
|||
{
|
||||
if (mVolumeImpl)
|
||||
{
|
||||
mVolumeImpl->updateRelativeXform();
|
||||
mVolumeImpl->updateRelativeXform(force_identity);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -3984,6 +3984,8 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
|||
}
|
||||
}
|
||||
|
||||
//drawable->getVObj()->setDebugText(llformat("%d", drawable->isState(LLDrawable::ANIMATED_CHILD)));
|
||||
|
||||
U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? facep->getTextureEntry()->getBumpmap() : 0;
|
||||
|
||||
LLViewerTexture* tex = facep->getTexture();
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
virtual bool isVolumeGlobal() const = 0; // Are we in global space?
|
||||
virtual bool isActive() const = 0; // Is this object currently active?
|
||||
virtual const LLMatrix4& getWorldMatrix(LLXformMatrix* xform) const = 0;
|
||||
virtual void updateRelativeXform() = 0;
|
||||
virtual void updateRelativeXform(bool force_identity = false) = 0;
|
||||
virtual U32 getID() const = 0;
|
||||
virtual void preRebuild() = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1794,15 +1794,15 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
|
|||
if (done)
|
||||
{
|
||||
drawablep->clearState(LLDrawable::ON_MOVE_LIST);
|
||||
if (drawablep->isState(LLDrawable::ANIMATED_CHILD)) // && drawablep->getVObj()->getAngularVelocity().isExactlyZero())
|
||||
{ //not a target omega object, will likely not receive any future world matrix updates
|
||||
if (drawablep->isState(LLDrawable::ANIMATED_CHILD))
|
||||
{ //will likely not receive any future world matrix updates
|
||||
// -- this keeps attachments from getting stuck in space and falling off your avatar
|
||||
drawablep->clearState(LLDrawable::ANIMATED_CHILD);
|
||||
LLSpatialGroup* group = drawablep->getSpatialGroup();
|
||||
if (group)
|
||||
markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, TRUE);
|
||||
if (drawablep->getVObj())
|
||||
{
|
||||
group->dirtyGeom();
|
||||
}
|
||||
drawablep->getVObj()->dirtySpatialGroup(TRUE);
|
||||
}
|
||||
}
|
||||
iter = moved_list.erase(curiter);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue