Combine renderPhysicsDisplay code loops, but don't actually fix any bugs X3

This commit is contained in:
Inusaito Sayori
2015-01-13 00:46:20 -05:00
parent 4abf23f9a9
commit eef7596aeb
2 changed files with 48 additions and 40 deletions

View File

@@ -3347,6 +3347,25 @@ void renderPhysicsShapes(LLSpatialGroup* group)
for (LLSpatialGroup::OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i) for (LLSpatialGroup::OctreeNode::const_element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{ {
LLDrawable* drawable = *i; LLDrawable* drawable = *i;
if (!drawable)
{
continue;
}
if (drawable->isSpatialBridge())
{
LLSpatialBridge* bridge = drawable->asPartition()->asBridge();
if (bridge)
{
gGL.pushMatrix();
gGL.multMatrix(bridge->mDrawable->getRenderMatrix());
bridge->renderPhysicsShapes();
gGL.popMatrix();
}
}
else
{
LLVOVolume* volume = drawable->getVOVolume(); LLVOVolume* volume = drawable->getVOVolume();
if (volume && !volume->isAttachment() && volume->getPhysicsShapeType() != LLViewerObject::PHYSICS_SHAPE_NONE ) if (volume && !volume->isAttachment() && volume->getPhysicsShapeType() != LLViewerObject::PHYSICS_SHAPE_NONE )
{ {
@@ -3396,6 +3415,7 @@ void renderPhysicsShapes(LLSpatialGroup* group)
} }
} }
} }
}
void renderTexturePriority(LLDrawable* drawable) void renderTexturePriority(LLDrawable* drawable)
{ {

View File

@@ -4640,18 +4640,6 @@ void LLPipeline::renderPhysicsDisplay()
} }
} }
for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
{
LLSpatialBridge* bridge = *i;
if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
{
gGL.pushMatrix();
gGL.multMatrix(bridge->mDrawable->getRenderMatrix());
bridge->renderPhysicsShapes();
gGL.popMatrix();
}
}
gGL.flush(); gGL.flush();
if (LLGLSLShader::sNoFixedFunction) if (LLGLSLShader::sNoFixedFunction)