summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpool.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-09-11 08:47:33 -0400
committerOz Linden <oz@lindenlab.com>2012-09-11 08:47:33 -0400
commit5eb6614913b97963d185afe698e677c880399c78 (patch)
treec7e342b7b68192fc0eb4eba09ef52c17ac16ffa5 /indra/newview/lldrawpool.cpp
parent8189b28d2247bf99f76ace63e78021a43b5e15a1 (diff)
parent2aadccd30843f3a29882d13ed2db50cebcba0374 (diff)
merge changes for DRTVWR-212
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rw-r--r--indra/newview/lldrawpool.cpp44
1 files changed, 43 insertions, 1 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 013c698445..81f4e3d48f 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -254,6 +254,48 @@ void LLFacePool::dirtyTextures(const std::set<LLViewerFetchedTexture*>& textures
{
}
+// static
+S32 LLFacePool::drawLoop(face_array_t& face_list)
+{
+ S32 res = 0;
+ if (!face_list.empty())
+ {
+ for (std::vector<LLFace*>::iterator iter = face_list.begin();
+ iter != face_list.end(); iter++)
+ {
+ LLFace *facep = *iter;
+ res += facep->renderIndexed();
+ }
+ }
+ return res;
+}
+
+// static
+S32 LLFacePool::drawLoopSetTex(face_array_t& face_list, S32 stage)
+{
+ S32 res = 0;
+ if (!face_list.empty())
+ {
+ for (std::vector<LLFace*>::iterator iter = face_list.begin();
+ iter != face_list.end(); iter++)
+ {
+ LLFace *facep = *iter;
+ gGL.getTexUnit(stage)->bind(facep->getTexture(), TRUE) ;
+ gGL.getTexUnit(0)->activate();
+ res += facep->renderIndexed();
+ }
+ }
+ return res;
+}
+
+void LLFacePool::drawLoop()
+{
+ if (!mDrawFace.empty())
+ {
+ drawLoop(mDrawFace);
+ }
+}
+
void LLFacePool::enqueue(LLFace* facep)
{
mDrawFace.push_back(facep);
@@ -401,7 +443,7 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures)
{
- for (LLCullResult::drawinfo_iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
+ for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
{
LLDrawInfo* pparams = *i;
if (pparams)