SL-19897 Fix for 100% transparent objects not showing up in highlight transparent until LoD switch.
parent
3a1b60b2ba
commit
22eecf1018
|
|
@ -777,7 +777,8 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c
|
|||
assert_states_valid(this);
|
||||
}
|
||||
|
||||
void LLSpatialGroup::destroyGL(bool keep_occlusion)
|
||||
|
||||
void LLSpatialGroup::destroyGLState(bool keep_occlusion)
|
||||
{
|
||||
setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::IMAGE_DIRTY);
|
||||
|
||||
|
|
@ -1290,45 +1291,11 @@ void drawBoxOutline(const LLVector4a& pos, const LLVector4a& size)
|
|||
drawBoxOutline(reinterpret_cast<const LLVector3&>(pos), reinterpret_cast<const LLVector3&>(size));
|
||||
}
|
||||
|
||||
class LLOctreeDirty : public OctreeTraveler
|
||||
{
|
||||
public:
|
||||
virtual void visit(const OctreeNode* state)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*) state->getListener(0);
|
||||
group->destroyGL();
|
||||
|
||||
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
|
||||
{
|
||||
LLDrawable* drawable = (LLDrawable*)(*i)->getDrawable();
|
||||
if(!drawable)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (drawable->getVObj().notNull() && !group->getSpatialPartition()->mRenderByGroup)
|
||||
{
|
||||
gPipeline.markRebuild(drawable, LLDrawable::REBUILD_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
for (LLSpatialGroup::bridge_list_t::iterator i = group->mBridgeList.begin(); i != group->mBridgeList.end(); ++i)
|
||||
{
|
||||
LLSpatialBridge* bridge = *i;
|
||||
traverse(bridge->mOctree);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void LLSpatialPartition::restoreGL()
|
||||
{
|
||||
}
|
||||
|
||||
void LLSpatialPartition::resetVertexBuffers()
|
||||
{
|
||||
LLOctreeDirty dirty;
|
||||
dirty.traverse(mOctree);
|
||||
}
|
||||
|
||||
BOOL LLSpatialPartition::getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_SPATIAL;
|
||||
|
|
|
|||
|
|
@ -295,7 +295,9 @@ public:
|
|||
BOOL removeObject(LLDrawable *drawablep, BOOL from_octree = FALSE);
|
||||
BOOL updateInGroup(LLDrawable *drawablep, BOOL immediate = FALSE); // Update position if it's in the group
|
||||
void shift(const LLVector4a &offset);
|
||||
void destroyGL(bool keep_occlusion = false);
|
||||
|
||||
// TODO: this no longer appears to be called, figure out if it's important and if not remove it
|
||||
void destroyGLState(bool keep_occlusion = false);
|
||||
|
||||
void updateDistance(LLCamera& camera);
|
||||
F32 getUpdateUrgency() const;
|
||||
|
|
@ -419,7 +421,6 @@ public:
|
|||
void renderDebug();
|
||||
void renderIntersectingBBoxes(LLCamera* camera);
|
||||
void restoreGL();
|
||||
void resetVertexBuffers();
|
||||
|
||||
BOOL getVisibleExtents(LLCamera& camera, LLVector3& visMin, LLVector3& visMax);
|
||||
|
||||
|
|
|
|||
|
|
@ -7826,10 +7826,6 @@ class LLToggleShaderControl : public view_listener_t
|
|||
BOOL checked = gSavedSettings.getBOOL( control_name );
|
||||
gSavedSettings.setBOOL( control_name, !checked );
|
||||
LLPipeline::refreshCachedSettings();
|
||||
//gPipeline.updateRenderDeferred();
|
||||
//gPipeline.releaseGLBuffers();
|
||||
//gPipeline.createGLBuffers();
|
||||
//gPipeline.resetVertexBuffers();
|
||||
LLViewerShaderMgr::instance()->setShaders();
|
||||
return !checked;
|
||||
}
|
||||
|
|
@ -8560,6 +8556,9 @@ class LLViewHighlightTransparent : public view_listener_t
|
|||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
LLDrawPoolAlpha::sShowDebugAlpha = !LLDrawPoolAlpha::sShowDebugAlpha;
|
||||
|
||||
// invisible objects skip building their render batches unless sShowDebugAlpha is true, so rebuild batches whenever toggling this flag
|
||||
gPipeline.rebuildDrawInfo();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10593,8 +10593,36 @@ void LLPipeline::handleShadowDetailChanged()
|
|||
}
|
||||
}
|
||||
|
||||
void LLPipeline::overrideEnvironmentMap()
|
||||
class LLOctreeDirty : public OctreeTraveler
|
||||
{
|
||||
//mReflectionMapManager.mProbes.clear();
|
||||
//mReflectionMapManager.addProbe(LLViewerCamera::instance().getOrigin());
|
||||
public:
|
||||
virtual void visit(const OctreeNode* state)
|
||||
{
|
||||
LLSpatialGroup* group = (LLSpatialGroup*)state->getListener(0);
|
||||
|
||||
group->setState(LLSpatialGroup::GEOM_DIRTY);
|
||||
gPipeline.markRebuild(group);
|
||||
|
||||
for (LLSpatialGroup::bridge_list_t::iterator i = group->mBridgeList.begin(); i != group->mBridgeList.end(); ++i)
|
||||
{
|
||||
LLSpatialBridge* bridge = *i;
|
||||
traverse(bridge->mOctree);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
void LLPipeline::rebuildDrawInfo()
|
||||
{
|
||||
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
||||
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
||||
{
|
||||
LLViewerRegion* region = *iter;
|
||||
|
||||
LLOctreeDirty dirty;
|
||||
|
||||
LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_VOLUME);
|
||||
dirty.traverse(part->mOctree);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,10 @@ public:
|
|||
bool allocateScreenBuffer(U32 resX, U32 resY, U32 samples);
|
||||
bool allocateShadowBuffer(U32 resX, U32 resY);
|
||||
|
||||
// rebuild all LLVOVolume render batches
|
||||
void rebuildDrawInfo();
|
||||
|
||||
// Clear LLFace mVertexBuffer pointers
|
||||
void resetVertexBuffers(LLDrawable* drawable);
|
||||
|
||||
// perform a profile of the given avatar
|
||||
|
|
@ -449,7 +453,6 @@ public:
|
|||
void handleShadowDetailChanged();
|
||||
|
||||
LLReflectionMapManager mReflectionMapManager;
|
||||
void overrideEnvironmentMap();
|
||||
|
||||
private:
|
||||
void unloadShaders();
|
||||
|
|
|
|||
Loading…
Reference in New Issue