MAINT-646: Faster traversal of render batch lists. https://bitbucket.org/davep/viewer-development/changeset/38b7779af5f9
This commit is contained in:
@@ -446,7 +446,7 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
|
|||||||
|
|
||||||
void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures)
|
void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures)
|
||||||
{
|
{
|
||||||
for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
|
for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
|
||||||
{
|
{
|
||||||
LLDrawInfo* pparams = *i;
|
LLDrawInfo* pparams = *i;
|
||||||
if (pparams)
|
if (pparams)
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ void LLDrawPoolAlpha::render(S32 pass)
|
|||||||
|
|
||||||
void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask)
|
void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask)
|
||||||
{
|
{
|
||||||
for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *i;
|
LLSpatialGroup* group = *i;
|
||||||
if (group->mSpatialPartition->mRenderByGroup &&
|
if (group->mSpatialPartition->mRenderByGroup &&
|
||||||
@@ -392,7 +392,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
|
|||||||
|
|
||||||
BOOL use_shaders = gPipeline.canUseVertexShaders();
|
BOOL use_shaders = gPipeline.canUseVertexShaders();
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
for (LLCullResult::sg_iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *i;
|
LLSpatialGroup* group = *i;
|
||||||
llassert(group);
|
llassert(group);
|
||||||
|
|||||||
@@ -1203,15 +1203,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
|||||||
|
|
||||||
if (pass >= 7 && pass < 9)
|
if (pass >= 7 && pass < 9)
|
||||||
{
|
{
|
||||||
LLGLEnable blend(GL_BLEND);
|
|
||||||
|
|
||||||
gGL.setColorMask(true, true);
|
|
||||||
gGL.blendFunc(LLRender::BF_SOURCE_ALPHA,
|
|
||||||
LLRender::BF_ONE_MINUS_SOURCE_ALPHA,
|
|
||||||
LLRender::BF_ZERO,
|
|
||||||
LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
|
|
||||||
|
|
||||||
|
|
||||||
if (pass == 7)
|
if (pass == 7)
|
||||||
{
|
{
|
||||||
renderRiggedAlpha(avatarp);
|
renderRiggedAlpha(avatarp);
|
||||||
@@ -1227,20 +1218,8 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
|||||||
|
|
||||||
if (pass == 9)
|
if (pass == 9)
|
||||||
{
|
{
|
||||||
LLGLEnable blend(GL_BLEND);
|
|
||||||
LLGLDisable test(GL_ALPHA_TEST);
|
|
||||||
gGL.flush();
|
|
||||||
|
|
||||||
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
|
|
||||||
glPolygonOffset(-1.0f, -1.0f);
|
|
||||||
gGL.setSceneBlendType(LLRender::BT_ADD);
|
|
||||||
|
|
||||||
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
|
||||||
gGL.setColorMask(false, true);
|
|
||||||
|
|
||||||
renderRiggedGlow(avatarp);
|
renderRiggedGlow(avatarp);
|
||||||
gGL.setColorMask(true, false);
|
|
||||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1640,17 +1619,56 @@ void LLDrawPoolAvatar::renderRiggedFullbrightShiny(LLVOAvatar* avatar)
|
|||||||
|
|
||||||
void LLDrawPoolAvatar::renderRiggedAlpha(LLVOAvatar* avatar)
|
void LLDrawPoolAvatar::renderRiggedAlpha(LLVOAvatar* avatar)
|
||||||
{
|
{
|
||||||
renderRigged(avatar, RIGGED_ALPHA);
|
if (!mRiggedFace[RIGGED_ALPHA].empty())
|
||||||
|
{
|
||||||
|
LLGLEnable blend(GL_BLEND);
|
||||||
|
|
||||||
|
gGL.setColorMask(true, true);
|
||||||
|
gGL.blendFunc(LLRender::BF_SOURCE_ALPHA,
|
||||||
|
LLRender::BF_ONE_MINUS_SOURCE_ALPHA,
|
||||||
|
LLRender::BF_ZERO,
|
||||||
|
LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
|
||||||
|
|
||||||
|
renderRigged(avatar, RIGGED_ALPHA);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLDrawPoolAvatar::renderRiggedFullbrightAlpha(LLVOAvatar* avatar)
|
void LLDrawPoolAvatar::renderRiggedFullbrightAlpha(LLVOAvatar* avatar)
|
||||||
{
|
{
|
||||||
renderRigged(avatar, RIGGED_FULLBRIGHT_ALPHA);
|
if (!mRiggedFace[RIGGED_FULLBRIGHT_ALPHA].empty())
|
||||||
|
{
|
||||||
|
LLGLEnable blend(GL_BLEND);
|
||||||
|
|
||||||
|
gGL.setColorMask(true, true);
|
||||||
|
gGL.blendFunc(LLRender::BF_SOURCE_ALPHA,
|
||||||
|
LLRender::BF_ONE_MINUS_SOURCE_ALPHA,
|
||||||
|
LLRender::BF_ZERO,
|
||||||
|
LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
|
||||||
|
|
||||||
|
renderRigged(avatar, RIGGED_FULLBRIGHT_ALPHA);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLDrawPoolAvatar::renderRiggedGlow(LLVOAvatar* avatar)
|
void LLDrawPoolAvatar::renderRiggedGlow(LLVOAvatar* avatar)
|
||||||
{
|
{
|
||||||
renderRigged(avatar, RIGGED_GLOW, true);
|
if (!mRiggedFace[RIGGED_GLOW].empty())
|
||||||
|
{
|
||||||
|
LLGLEnable blend(GL_BLEND);
|
||||||
|
LLGLDisable test(GL_ALPHA_TEST);
|
||||||
|
gGL.flush();
|
||||||
|
|
||||||
|
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
|
||||||
|
glPolygonOffset(-1.0f, -1.0f);
|
||||||
|
gGL.setSceneBlendType(LLRender::BT_ADD);
|
||||||
|
|
||||||
|
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||||
|
gGL.setColorMask(false, true);
|
||||||
|
|
||||||
|
renderRigged(avatar, RIGGED_GLOW, true);
|
||||||
|
|
||||||
|
gGL.setColorMask(true, false);
|
||||||
|
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -848,12 +848,12 @@ void LLDrawPoolBump::renderDeferred(S32 pass)
|
|||||||
LLFastTimer ftm(FTM_RENDER_BUMP);
|
LLFastTimer ftm(FTM_RENDER_BUMP);
|
||||||
|
|
||||||
U32 type = LLRenderPass::PASS_BUMP;
|
U32 type = LLRenderPass::PASS_BUMP;
|
||||||
LLCullResult::drawinfo_list_t::iterator begin = gPipeline.beginRenderMap(type);
|
LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type);
|
||||||
LLCullResult::drawinfo_list_t::iterator end = gPipeline.endRenderMap(type);
|
LLCullResult::drawinfo_iterator end = gPipeline.endRenderMap(type);
|
||||||
|
|
||||||
U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_BINORMAL | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_COLOR;
|
U32 mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_BINORMAL | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_COLOR;
|
||||||
|
|
||||||
for (LLCullResult::drawinfo_list_t::iterator i = begin; i != end; ++i)
|
for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i)
|
||||||
{
|
{
|
||||||
LLDrawInfo& params = **i;
|
LLDrawInfo& params = **i;
|
||||||
|
|
||||||
@@ -1449,10 +1449,10 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
|
|||||||
|
|
||||||
void LLDrawPoolBump::renderBump(U32 type, U32 mask)
|
void LLDrawPoolBump::renderBump(U32 type, U32 mask)
|
||||||
{
|
{
|
||||||
LLCullResult::drawinfo_list_t::iterator begin = gPipeline.beginRenderMap(type);
|
LLCullResult::drawinfo_iterator begin = gPipeline.beginRenderMap(type);
|
||||||
LLCullResult::drawinfo_list_t::iterator end = gPipeline.endRenderMap(type);
|
LLCullResult::drawinfo_iterator end = gPipeline.endRenderMap(type);
|
||||||
|
|
||||||
for (LLCullResult::drawinfo_list_t::iterator i = begin; i != end; ++i)
|
for (LLCullResult::drawinfo_iterator i = begin; i != end; ++i)
|
||||||
{
|
{
|
||||||
LLDrawInfo& params = **i;
|
LLDrawInfo& params = **i;
|
||||||
|
|
||||||
|
|||||||
@@ -4476,29 +4476,64 @@ LLVertexBuffer* LLGeometryManager::createVertexBuffer(U32 type_mask, U32 usage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::LLCullResult()
|
LLCullResult::LLCullResult()
|
||||||
{
|
{
|
||||||
|
mVisibleGroupsAllocated = 0;
|
||||||
|
mAlphaGroupsAllocated = 0;
|
||||||
|
mOcclusionGroupsAllocated = 0;
|
||||||
|
mDrawableGroupsAllocated = 0;
|
||||||
|
mVisibleListAllocated = 0;
|
||||||
|
mVisibleBridgeAllocated = 0;
|
||||||
|
|
||||||
|
mVisibleGroups = NULL;
|
||||||
|
mVisibleGroupsEnd = NULL;
|
||||||
|
mAlphaGroups = NULL;
|
||||||
|
mAlphaGroupsEnd = NULL;
|
||||||
|
mOcclusionGroups = NULL;
|
||||||
|
mOcclusionGroupsEnd = NULL;
|
||||||
|
mDrawableGroups = NULL;
|
||||||
|
mDrawableGroupsEnd = NULL;
|
||||||
|
mVisibleList = NULL;
|
||||||
|
mVisibleListEnd = NULL;
|
||||||
|
mVisibleBridge = NULL;
|
||||||
|
mVisibleBridgeEnd = NULL;
|
||||||
|
|
||||||
|
for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++)
|
||||||
|
{
|
||||||
|
mRenderMap[i] = NULL;
|
||||||
|
mRenderMapEnd[i] = NULL;
|
||||||
|
mRenderMapAllocated[i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLCullResult::pushBack(void**& head, U32& count, void* val)
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
head = (void**) realloc((void*) head, sizeof(void*) * count);
|
||||||
|
head[count-1] = val;
|
||||||
|
}
|
||||||
|
|
||||||
void LLCullResult::clear()
|
void LLCullResult::clear()
|
||||||
{
|
{
|
||||||
mVisibleGroupsSize = 0;
|
mVisibleGroupsSize = 0;
|
||||||
mVisibleGroupsEnd = mVisibleGroups.begin();
|
mVisibleGroupsEnd = mVisibleGroups;
|
||||||
|
|
||||||
mAlphaGroupsSize = 0;
|
mAlphaGroupsSize = 0;
|
||||||
mAlphaGroupsEnd = mAlphaGroups.begin();
|
mAlphaGroupsEnd = mAlphaGroups;
|
||||||
|
|
||||||
mOcclusionGroupsSize = 0;
|
mOcclusionGroupsSize = 0;
|
||||||
mOcclusionGroupsEnd = mOcclusionGroups.begin();
|
mOcclusionGroupsEnd = mOcclusionGroups;
|
||||||
|
|
||||||
mDrawableGroupsSize = 0;
|
mDrawableGroupsSize = 0;
|
||||||
mDrawableGroupsEnd = mDrawableGroups.begin();
|
mDrawableGroupsEnd = mDrawableGroups;
|
||||||
|
|
||||||
mVisibleListSize = 0;
|
mVisibleListSize = 0;
|
||||||
mVisibleListEnd = mVisibleList.begin();
|
mVisibleListEnd = mVisibleList;
|
||||||
|
|
||||||
mVisibleBridgeSize = 0;
|
mVisibleBridgeSize = 0;
|
||||||
mVisibleBridgeEnd = mVisibleBridge.begin();
|
mVisibleBridgeEnd = mVisibleBridge;
|
||||||
|
|
||||||
|
|
||||||
for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++)
|
for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++)
|
||||||
{
|
{
|
||||||
@@ -4507,176 +4542,176 @@ void LLCullResult::clear()
|
|||||||
mRenderMap[i][j] = 0;
|
mRenderMap[i][j] = 0;
|
||||||
}
|
}
|
||||||
mRenderMapSize[i] = 0;
|
mRenderMapSize[i] = 0;
|
||||||
mRenderMapEnd[i] = mRenderMap[i].begin();
|
mRenderMapEnd[i] = mRenderMap[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLCullResult::beginVisibleGroups()
|
LLCullResult::sg_iterator LLCullResult::beginVisibleGroups()
|
||||||
{
|
{
|
||||||
return mVisibleGroups.begin();
|
return mVisibleGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLCullResult::endVisibleGroups()
|
LLCullResult::sg_iterator LLCullResult::endVisibleGroups()
|
||||||
{
|
{
|
||||||
return mVisibleGroupsEnd;
|
return mVisibleGroupsEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLCullResult::beginAlphaGroups()
|
LLCullResult::sg_iterator LLCullResult::beginAlphaGroups()
|
||||||
{
|
{
|
||||||
return mAlphaGroups.begin();
|
return mAlphaGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLCullResult::endAlphaGroups()
|
LLCullResult::sg_iterator LLCullResult::endAlphaGroups()
|
||||||
{
|
{
|
||||||
return mAlphaGroupsEnd;
|
return mAlphaGroupsEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLCullResult::beginOcclusionGroups()
|
LLCullResult::sg_iterator LLCullResult::beginOcclusionGroups()
|
||||||
{
|
{
|
||||||
return mOcclusionGroups.begin();
|
return mOcclusionGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLCullResult::endOcclusionGroups()
|
LLCullResult::sg_iterator LLCullResult::endOcclusionGroups()
|
||||||
{
|
{
|
||||||
return mOcclusionGroupsEnd;
|
return mOcclusionGroupsEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLCullResult::beginDrawableGroups()
|
LLCullResult::sg_iterator LLCullResult::beginDrawableGroups()
|
||||||
{
|
{
|
||||||
return mDrawableGroups.begin();
|
return mDrawableGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLCullResult::endDrawableGroups()
|
LLCullResult::sg_iterator LLCullResult::endDrawableGroups()
|
||||||
{
|
{
|
||||||
return mDrawableGroupsEnd;
|
return mDrawableGroupsEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::drawable_list_t::iterator LLCullResult::beginVisibleList()
|
LLCullResult::drawable_iterator LLCullResult::beginVisibleList()
|
||||||
{
|
{
|
||||||
return mVisibleList.begin();
|
return mVisibleList;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::drawable_list_t::iterator LLCullResult::endVisibleList()
|
LLCullResult::drawable_iterator LLCullResult::endVisibleList()
|
||||||
{
|
{
|
||||||
return mVisibleListEnd;
|
return mVisibleListEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::bridge_list_t::iterator LLCullResult::beginVisibleBridge()
|
LLCullResult::bridge_iterator LLCullResult::beginVisibleBridge()
|
||||||
{
|
{
|
||||||
return mVisibleBridge.begin();
|
return mVisibleBridge;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::bridge_list_t::iterator LLCullResult::endVisibleBridge()
|
LLCullResult::bridge_iterator LLCullResult::endVisibleBridge()
|
||||||
{
|
{
|
||||||
return mVisibleBridgeEnd;
|
return mVisibleBridgeEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::drawinfo_list_t::iterator LLCullResult::beginRenderMap(U32 type)
|
LLCullResult::drawinfo_iterator LLCullResult::beginRenderMap(U32 type)
|
||||||
{
|
{
|
||||||
return mRenderMap[type].begin();
|
return mRenderMap[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::drawinfo_list_t::iterator LLCullResult::endRenderMap(U32 type)
|
LLCullResult::drawinfo_iterator LLCullResult::endRenderMap(U32 type)
|
||||||
{
|
{
|
||||||
return mRenderMapEnd[type];
|
return mRenderMapEnd[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLCullResult::pushVisibleGroup(LLSpatialGroup* group)
|
void LLCullResult::pushVisibleGroup(LLSpatialGroup* group)
|
||||||
{
|
{
|
||||||
if (mVisibleGroupsSize < mVisibleGroups.size())
|
if (mVisibleGroupsSize < mVisibleGroupsAllocated)
|
||||||
{
|
{
|
||||||
mVisibleGroups[mVisibleGroupsSize] = group;
|
mVisibleGroups[mVisibleGroupsSize] = group;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mVisibleGroups.push_back(group);
|
pushBack((void**&) mVisibleGroups, mVisibleGroupsAllocated, (void*) group);
|
||||||
}
|
}
|
||||||
++mVisibleGroupsSize;
|
++mVisibleGroupsSize;
|
||||||
mVisibleGroupsEnd = mVisibleGroups.begin()+mVisibleGroupsSize;
|
mVisibleGroupsEnd = mVisibleGroups+mVisibleGroupsSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLCullResult::pushAlphaGroup(LLSpatialGroup* group)
|
void LLCullResult::pushAlphaGroup(LLSpatialGroup* group)
|
||||||
{
|
{
|
||||||
if (mAlphaGroupsSize < mAlphaGroups.size())
|
if (mAlphaGroupsSize < mAlphaGroupsAllocated)
|
||||||
{
|
{
|
||||||
mAlphaGroups[mAlphaGroupsSize] = group;
|
mAlphaGroups[mAlphaGroupsSize] = group;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mAlphaGroups.push_back(group);
|
pushBack((void**&) mAlphaGroups, mAlphaGroupsAllocated, (void*) group);
|
||||||
}
|
}
|
||||||
++mAlphaGroupsSize;
|
++mAlphaGroupsSize;
|
||||||
mAlphaGroupsEnd = mAlphaGroups.begin()+mAlphaGroupsSize;
|
mAlphaGroupsEnd = mAlphaGroups+mAlphaGroupsSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group)
|
void LLCullResult::pushOcclusionGroup(LLSpatialGroup* group)
|
||||||
{
|
{
|
||||||
if (mOcclusionGroupsSize < mOcclusionGroups.size())
|
if (mOcclusionGroupsSize < mOcclusionGroupsAllocated)
|
||||||
{
|
{
|
||||||
mOcclusionGroups[mOcclusionGroupsSize] = group;
|
mOcclusionGroups[mOcclusionGroupsSize] = group;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mOcclusionGroups.push_back(group);
|
pushBack((void**&) mOcclusionGroups, mOcclusionGroupsAllocated, (void*) group);
|
||||||
}
|
}
|
||||||
++mOcclusionGroupsSize;
|
++mOcclusionGroupsSize;
|
||||||
mOcclusionGroupsEnd = mOcclusionGroups.begin()+mOcclusionGroupsSize;
|
mOcclusionGroupsEnd = mOcclusionGroups+mOcclusionGroupsSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLCullResult::pushDrawableGroup(LLSpatialGroup* group)
|
void LLCullResult::pushDrawableGroup(LLSpatialGroup* group)
|
||||||
{
|
{
|
||||||
if (mDrawableGroupsSize < mDrawableGroups.size())
|
if (mDrawableGroupsSize < mDrawableGroupsAllocated)
|
||||||
{
|
{
|
||||||
mDrawableGroups[mDrawableGroupsSize] = group;
|
mDrawableGroups[mDrawableGroupsSize] = group;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mDrawableGroups.push_back(group);
|
pushBack((void**&) mDrawableGroups, mDrawableGroupsAllocated, (void*) group);
|
||||||
}
|
}
|
||||||
++mDrawableGroupsSize;
|
++mDrawableGroupsSize;
|
||||||
mDrawableGroupsEnd = mDrawableGroups.begin()+mDrawableGroupsSize;
|
mDrawableGroupsEnd = mDrawableGroups+mDrawableGroupsSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLCullResult::pushDrawable(LLDrawable* drawable)
|
void LLCullResult::pushDrawable(LLDrawable* drawable)
|
||||||
{
|
{
|
||||||
if (mVisibleListSize < mVisibleList.size())
|
if (mVisibleListSize < mVisibleListAllocated)
|
||||||
{
|
{
|
||||||
mVisibleList[mVisibleListSize] = drawable;
|
mVisibleList[mVisibleListSize] = drawable;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mVisibleList.push_back(drawable);
|
pushBack((void**&) mVisibleList, mVisibleListAllocated, (void*) drawable);
|
||||||
}
|
}
|
||||||
++mVisibleListSize;
|
++mVisibleListSize;
|
||||||
mVisibleListEnd = mVisibleList.begin()+mVisibleListSize;
|
mVisibleListEnd = mVisibleList+mVisibleListSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLCullResult::pushBridge(LLSpatialBridge* bridge)
|
void LLCullResult::pushBridge(LLSpatialBridge* bridge)
|
||||||
{
|
{
|
||||||
if (mVisibleBridgeSize < mVisibleBridge.size())
|
if (mVisibleBridgeSize < mVisibleBridgeAllocated)
|
||||||
{
|
{
|
||||||
mVisibleBridge[mVisibleBridgeSize] = bridge;
|
mVisibleBridge[mVisibleBridgeSize] = bridge;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mVisibleBridge.push_back(bridge);
|
pushBack((void**&) mVisibleBridge, mVisibleBridgeAllocated, (void*) bridge);
|
||||||
}
|
}
|
||||||
++mVisibleBridgeSize;
|
++mVisibleBridgeSize;
|
||||||
mVisibleBridgeEnd = mVisibleBridge.begin()+mVisibleBridgeSize;
|
mVisibleBridgeEnd = mVisibleBridge+mVisibleBridgeSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info)
|
void LLCullResult::pushDrawInfo(U32 type, LLDrawInfo* draw_info)
|
||||||
{
|
{
|
||||||
if (mRenderMapSize[type] < mRenderMap[type].size())
|
if (mRenderMapSize[type] < mRenderMapAllocated[type])
|
||||||
{
|
{
|
||||||
mRenderMap[type][mRenderMapSize[type]] = draw_info;
|
mRenderMap[type][mRenderMapSize[type]] = draw_info;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mRenderMap[type].push_back(draw_info);
|
pushBack((void**&) mRenderMap[type], mRenderMapAllocated[type], (void*) draw_info);
|
||||||
}
|
}
|
||||||
++mRenderMapSize[type];
|
++mRenderMapSize[type];
|
||||||
mRenderMapEnd[type] = mRenderMap[type].begin() + mRenderMapSize[type];
|
mRenderMapEnd[type] = mRenderMap[type] + mRenderMapSize[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -522,34 +522,39 @@ class LLCullResult
|
|||||||
public:
|
public:
|
||||||
LLCullResult();
|
LLCullResult();
|
||||||
|
|
||||||
typedef std::vector<LLSpatialGroup*> sg_list_t;
|
typedef LLSpatialGroup** sg_list_t;
|
||||||
typedef std::vector<LLDrawable*> drawable_list_t;
|
typedef LLDrawable** drawable_list_t;
|
||||||
typedef std::vector<LLSpatialBridge*> bridge_list_t;
|
typedef LLSpatialBridge** bridge_list_t;
|
||||||
typedef std::vector<LLDrawInfo*> drawinfo_list_t;
|
typedef LLDrawInfo** drawinfo_list_t;
|
||||||
|
|
||||||
|
typedef LLSpatialGroup** sg_iterator;
|
||||||
|
typedef LLSpatialBridge** bridge_iterator;
|
||||||
|
typedef LLDrawInfo** drawinfo_iterator;
|
||||||
|
typedef LLDrawable** drawable_iterator;
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
sg_list_t::iterator beginVisibleGroups();
|
sg_iterator beginVisibleGroups();
|
||||||
sg_list_t::iterator endVisibleGroups();
|
sg_iterator endVisibleGroups();
|
||||||
|
|
||||||
sg_list_t::iterator beginAlphaGroups();
|
sg_iterator beginAlphaGroups();
|
||||||
sg_list_t::iterator endAlphaGroups();
|
sg_iterator endAlphaGroups();
|
||||||
|
|
||||||
bool hasOcclusionGroups() { return mOcclusionGroupsSize > 0; }
|
bool hasOcclusionGroups() { return mOcclusionGroupsSize > 0; }
|
||||||
sg_list_t::iterator beginOcclusionGroups();
|
sg_iterator beginOcclusionGroups();
|
||||||
sg_list_t::iterator endOcclusionGroups();
|
sg_iterator endOcclusionGroups();
|
||||||
|
|
||||||
sg_list_t::iterator beginDrawableGroups();
|
sg_iterator beginDrawableGroups();
|
||||||
sg_list_t::iterator endDrawableGroups();
|
sg_iterator endDrawableGroups();
|
||||||
|
|
||||||
drawable_list_t::iterator beginVisibleList();
|
drawable_iterator beginVisibleList();
|
||||||
drawable_list_t::iterator endVisibleList();
|
drawable_iterator endVisibleList();
|
||||||
|
|
||||||
bridge_list_t::iterator beginVisibleBridge();
|
bridge_iterator beginVisibleBridge();
|
||||||
bridge_list_t::iterator endVisibleBridge();
|
bridge_iterator endVisibleBridge();
|
||||||
|
|
||||||
drawinfo_list_t::iterator beginRenderMap(U32 type);
|
drawinfo_iterator beginRenderMap(U32 type);
|
||||||
drawinfo_list_t::iterator endRenderMap(U32 type);
|
drawinfo_iterator endRenderMap(U32 type);
|
||||||
|
|
||||||
void pushVisibleGroup(LLSpatialGroup* group);
|
void pushVisibleGroup(LLSpatialGroup* group);
|
||||||
void pushAlphaGroup(LLSpatialGroup* group);
|
void pushAlphaGroup(LLSpatialGroup* group);
|
||||||
@@ -569,28 +574,41 @@ public:
|
|||||||
void assertDrawMapsEmpty();
|
void assertDrawMapsEmpty();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
void pushBack(void** &head, U32& count, void* val);
|
||||||
|
|
||||||
U32 mVisibleGroupsSize;
|
U32 mVisibleGroupsSize;
|
||||||
U32 mAlphaGroupsSize;
|
U32 mAlphaGroupsSize;
|
||||||
U32 mOcclusionGroupsSize;
|
U32 mOcclusionGroupsSize;
|
||||||
U32 mDrawableGroupsSize;
|
U32 mDrawableGroupsSize;
|
||||||
U32 mVisibleListSize;
|
U32 mVisibleListSize;
|
||||||
U32 mVisibleBridgeSize;
|
U32 mVisibleBridgeSize;
|
||||||
|
|
||||||
|
U32 mVisibleGroupsAllocated;
|
||||||
|
U32 mAlphaGroupsAllocated;
|
||||||
|
U32 mOcclusionGroupsAllocated;
|
||||||
|
U32 mDrawableGroupsAllocated;
|
||||||
|
U32 mVisibleListAllocated;
|
||||||
|
U32 mVisibleBridgeAllocated;
|
||||||
|
|
||||||
U32 mRenderMapSize[LLRenderPass::NUM_RENDER_TYPES];
|
U32 mRenderMapSize[LLRenderPass::NUM_RENDER_TYPES];
|
||||||
|
|
||||||
sg_list_t mVisibleGroups;
|
sg_list_t mVisibleGroups;
|
||||||
sg_list_t::iterator mVisibleGroupsEnd;
|
sg_iterator mVisibleGroupsEnd;
|
||||||
sg_list_t mAlphaGroups;
|
sg_list_t mAlphaGroups;
|
||||||
sg_list_t::iterator mAlphaGroupsEnd;
|
sg_iterator mAlphaGroupsEnd;
|
||||||
sg_list_t mOcclusionGroups;
|
sg_list_t mOcclusionGroups;
|
||||||
sg_list_t::iterator mOcclusionGroupsEnd;
|
sg_iterator mOcclusionGroupsEnd;
|
||||||
sg_list_t mDrawableGroups;
|
sg_list_t mDrawableGroups;
|
||||||
sg_list_t::iterator mDrawableGroupsEnd;
|
sg_iterator mDrawableGroupsEnd;
|
||||||
drawable_list_t mVisibleList;
|
drawable_list_t mVisibleList;
|
||||||
drawable_list_t::iterator mVisibleListEnd;
|
drawable_iterator mVisibleListEnd;
|
||||||
bridge_list_t mVisibleBridge;
|
bridge_list_t mVisibleBridge;
|
||||||
bridge_list_t::iterator mVisibleBridgeEnd;
|
bridge_iterator mVisibleBridgeEnd;
|
||||||
drawinfo_list_t mRenderMap[LLRenderPass::NUM_RENDER_TYPES];
|
drawinfo_list_t mRenderMap[LLRenderPass::NUM_RENDER_TYPES];
|
||||||
drawinfo_list_t::iterator mRenderMapEnd[LLRenderPass::NUM_RENDER_TYPES];
|
U32 mRenderMapAllocated[LLRenderPass::NUM_RENDER_TYPES];
|
||||||
|
drawinfo_iterator mRenderMapEnd[LLRenderPass::NUM_RENDER_TYPES];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1815,19 +1815,19 @@ void LLPipeline::checkReferences(LLFace* face)
|
|||||||
#if 0
|
#if 0
|
||||||
if (sCull)
|
if (sCull)
|
||||||
{
|
{
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
check_references(group, face);
|
check_references(group, face);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
check_references(group, face);
|
check_references(group, face);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
check_references(group, face);
|
check_references(group, face);
|
||||||
@@ -1847,19 +1847,19 @@ void LLPipeline::checkReferences(LLDrawable* drawable)
|
|||||||
#if 0
|
#if 0
|
||||||
if (sCull)
|
if (sCull)
|
||||||
{
|
{
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
check_references(group, drawable);
|
check_references(group, drawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
check_references(group, drawable);
|
check_references(group, drawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
check_references(group, drawable);
|
check_references(group, drawable);
|
||||||
@@ -1898,19 +1898,19 @@ void LLPipeline::checkReferences(LLDrawInfo* draw_info)
|
|||||||
#if 0
|
#if 0
|
||||||
if (sCull)
|
if (sCull)
|
||||||
{
|
{
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
check_references(group, draw_info);
|
check_references(group, draw_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
check_references(group, draw_info);
|
check_references(group, draw_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
check_references(group, draw_info);
|
check_references(group, draw_info);
|
||||||
@@ -1924,7 +1924,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group)
|
|||||||
#if 0
|
#if 0
|
||||||
if (sCull)
|
if (sCull)
|
||||||
{
|
{
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
||||||
{
|
{
|
||||||
if (group == *iter)
|
if (group == *iter)
|
||||||
{
|
{
|
||||||
@@ -1932,7 +1932,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginAlphaGroups(); iter != sCull->endAlphaGroups(); ++iter)
|
||||||
{
|
{
|
||||||
if (group == *iter)
|
if (group == *iter)
|
||||||
{
|
{
|
||||||
@@ -1940,7 +1940,7 @@ void LLPipeline::checkReferences(LLSpatialGroup* group)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
||||||
{
|
{
|
||||||
if (group == *iter)
|
if (group == *iter)
|
||||||
{
|
{
|
||||||
@@ -2282,7 +2282,7 @@ void LLPipeline::doOcclusion(LLCamera& camera)
|
|||||||
}
|
}
|
||||||
mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
|
mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginOcclusionGroups(); iter != sCull->endOcclusionGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginOcclusionGroups(); iter != sCull->endOcclusionGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
group->doOcclusion(&camera);
|
group->doOcclusion(&camera);
|
||||||
@@ -2816,7 +2816,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
|
|||||||
//LLVertexBuffer::unbind();
|
//LLVertexBuffer::unbind();
|
||||||
|
|
||||||
grabReferences(result);
|
grabReferences(result);
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginDrawableGroups(); iter != sCull->endDrawableGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
group->checkOcclusion();
|
group->checkOcclusion();
|
||||||
@@ -2842,9 +2842,9 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
|
|||||||
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
|
if (LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* last_group = NULL;
|
LLSpatialGroup* last_group = NULL;
|
||||||
for (LLCullResult::bridge_list_t::iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
|
for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
|
||||||
{
|
{
|
||||||
LLCullResult::bridge_list_t::iterator cur_iter = i;
|
LLCullResult::bridge_iterator cur_iter = i;
|
||||||
LLSpatialBridge* bridge = *cur_iter;
|
LLSpatialBridge* bridge = *cur_iter;
|
||||||
LLSpatialGroup* group = bridge->getSpatialGroup();
|
LLSpatialGroup* group = bridge->getSpatialGroup();
|
||||||
|
|
||||||
@@ -2874,7 +2874,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::sg_list_t::iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
for (LLCullResult::sg_iterator iter = sCull->beginVisibleGroups(); iter != sCull->endVisibleGroups(); ++iter)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *iter;
|
LLSpatialGroup* group = *iter;
|
||||||
group->checkOcclusion();
|
group->checkOcclusion();
|
||||||
@@ -2896,7 +2896,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
|
|||||||
|
|
||||||
{
|
{
|
||||||
LLFastTimer ftm(FTM_STATESORT_DRAWABLE);
|
LLFastTimer ftm(FTM_STATESORT_DRAWABLE);
|
||||||
for (LLCullResult::drawable_list_t::iterator iter = sCull->beginVisibleList();
|
for (LLCullResult::drawable_iterator iter = sCull->beginVisibleList();
|
||||||
iter != sCull->endVisibleList(); ++iter)
|
iter != sCull->endVisibleList(); ++iter)
|
||||||
{
|
{
|
||||||
LLDrawable *drawablep = *iter;
|
LLDrawable *drawablep = *iter;
|
||||||
@@ -3045,11 +3045,11 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void forAllDrawables(LLCullResult::sg_list_t::iterator begin,
|
void forAllDrawables(LLCullResult::sg_iterator begin,
|
||||||
LLCullResult::sg_list_t::iterator end,
|
LLCullResult::sg_iterator end,
|
||||||
void (*func)(LLDrawable*))
|
void (*func)(LLDrawable*))
|
||||||
{
|
{
|
||||||
for (LLCullResult::sg_list_t::iterator i = begin; i != end; ++i)
|
for (LLCullResult::sg_iterator i = begin; i != end; ++i)
|
||||||
{
|
{
|
||||||
for (LLSpatialGroup::element_iter j = (*i)->getData().begin(); j != (*i)->getData().end(); ++j)
|
for (LLSpatialGroup::element_iter j = (*i)->getData().begin(); j != (*i)->getData().end(); ++j)
|
||||||
{
|
{
|
||||||
@@ -3219,7 +3219,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
|||||||
|
|
||||||
llpushcallstacks ;
|
llpushcallstacks ;
|
||||||
//rebuild drawable geometry
|
//rebuild drawable geometry
|
||||||
for (LLCullResult::sg_list_t::iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i)
|
for (LLCullResult::sg_iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *i;
|
LLSpatialGroup* group = *i;
|
||||||
if (!sUseOcclusion ||
|
if (!sUseOcclusion ||
|
||||||
@@ -3237,7 +3237,7 @@ void LLPipeline::postSort(LLCamera& camera)
|
|||||||
|
|
||||||
|
|
||||||
//build render map
|
//build render map
|
||||||
for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
|
for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *i;
|
LLSpatialGroup* group = *i;
|
||||||
|
|
||||||
@@ -4179,7 +4179,7 @@ void LLPipeline::renderPhysicsDisplay()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::bridge_list_t::const_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
|
for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
|
||||||
{
|
{
|
||||||
LLSpatialBridge* bridge = *i;
|
LLSpatialBridge* bridge = *i;
|
||||||
if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
|
if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
|
||||||
@@ -4238,7 +4238,7 @@ void LLPipeline::renderDebug()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (LLCullResult::bridge_list_t::const_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
|
for (LLCullResult::bridge_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i)
|
||||||
{
|
{
|
||||||
LLSpatialBridge* bridge = *i;
|
LLSpatialBridge* bridge = *i;
|
||||||
if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
|
if (!bridge->isDead() && hasRenderType(bridge->mDrawableType))
|
||||||
@@ -9328,7 +9328,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
|
|||||||
|
|
||||||
void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture)
|
void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture)
|
||||||
{
|
{
|
||||||
for (LLCullResult::sg_list_t::iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
|
for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
|
||||||
{
|
{
|
||||||
LLSpatialGroup* group = *i;
|
LLSpatialGroup* group = *i;
|
||||||
if (!group->isDead() &&
|
if (!group->isDead() &&
|
||||||
@@ -9593,22 +9593,22 @@ BOOL LLPipeline::hasRenderBatches(const U32 type) const
|
|||||||
return sCull->getRenderMapSize(type) > 0;
|
return sCull->getRenderMapSize(type) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::drawinfo_list_t::iterator LLPipeline::beginRenderMap(U32 type)
|
LLCullResult::drawinfo_iterator LLPipeline::beginRenderMap(U32 type)
|
||||||
{
|
{
|
||||||
return sCull->beginRenderMap(type);
|
return sCull->beginRenderMap(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::drawinfo_list_t::iterator LLPipeline::endRenderMap(U32 type)
|
LLCullResult::drawinfo_iterator LLPipeline::endRenderMap(U32 type)
|
||||||
{
|
{
|
||||||
return sCull->endRenderMap(type);
|
return sCull->endRenderMap(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLPipeline::beginAlphaGroups()
|
LLCullResult::sg_iterator LLPipeline::beginAlphaGroups()
|
||||||
{
|
{
|
||||||
return sCull->beginAlphaGroups();
|
return sCull->beginAlphaGroups();
|
||||||
}
|
}
|
||||||
|
|
||||||
LLCullResult::sg_list_t::iterator LLPipeline::endAlphaGroups()
|
LLCullResult::sg_iterator LLPipeline::endAlphaGroups()
|
||||||
{
|
{
|
||||||
return sCull->endAlphaGroups();
|
return sCull->endAlphaGroups();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,10 +296,10 @@ public:
|
|||||||
void setLight(LLDrawable *drawablep, BOOL is_light);
|
void setLight(LLDrawable *drawablep, BOOL is_light);
|
||||||
|
|
||||||
BOOL hasRenderBatches(const U32 type) const;
|
BOOL hasRenderBatches(const U32 type) const;
|
||||||
LLCullResult::drawinfo_list_t::iterator beginRenderMap(U32 type);
|
LLCullResult::drawinfo_iterator beginRenderMap(U32 type);
|
||||||
LLCullResult::drawinfo_list_t::iterator endRenderMap(U32 type);
|
LLCullResult::drawinfo_iterator endRenderMap(U32 type);
|
||||||
LLCullResult::sg_list_t::iterator beginAlphaGroups();
|
LLCullResult::sg_iterator beginAlphaGroups();
|
||||||
LLCullResult::sg_list_t::iterator endAlphaGroups();
|
LLCullResult::sg_iterator endAlphaGroups();
|
||||||
|
|
||||||
|
|
||||||
void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES);
|
void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES);
|
||||||
|
|||||||
Reference in New Issue
Block a user