diff options
author | Dave Parks <davep@lindenlab.com> | 2011-06-10 18:51:22 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-06-10 18:51:22 -0500 |
commit | 99b05f9647353f9bf5a44b1eb424105598d2b725 (patch) | |
tree | 57b5eee92a3e0b959f363339cc48860b3226054b /indra/newview/pipeline.cpp | |
parent | 84132d5edb7fa77c24b28e09ff17f82995d6eec5 (diff) |
Fix for show object updates not working (and crashing, and behaving badly).
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4d678117a5..f2294335ed 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4096,6 +4096,37 @@ void LLPipeline::renderDebug() bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD); + if (!hud_only && !mDebugBlips.empty()) + { //render debug blips + glPointSize(8.f); + LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS); + + gGL.begin(LLRender::POINTS); + for (std::list<DebugBlip>::iterator iter = mDebugBlips.begin(); iter != mDebugBlips.end(); ) + { + DebugBlip& blip = *iter; + + blip.mAge += gFrameIntervalSeconds; + if (blip.mAge > 2.f) + { + mDebugBlips.erase(iter++); + } + else + { + iter++; + } + + blip.mPosition.mV[2] += gFrameIntervalSeconds*2.f; + + gGL.color4fv(blip.mColor.mV); + gGL.vertex3fv(blip.mPosition.mV); + } + gGL.end(); + gGL.flush(); + glPointSize(1.f); + } + + // Debug stuff. for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) @@ -9839,4 +9870,9 @@ void LLPipeline::clearRenderTypeMask(U32 type, ...) } } +void LLPipeline::addDebugBlip(const LLVector3& position, const LLColor4& color) +{ + DebugBlip blip(position, color); + mDebugBlips.push_back(blip); +} |