aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/pipeline.cpp')
-rw-r--r--linden/indra/newview/pipeline.cpp42
1 files changed, 41 insertions, 1 deletions
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp
index 81f1a90..51ea557 100644
--- a/linden/indra/newview/pipeline.cpp
+++ b/linden/indra/newview/pipeline.cpp
@@ -220,6 +220,7 @@ void display_update_camera();
220 220
221S32 LLPipeline::sCompiles = 0; 221S32 LLPipeline::sCompiles = 0;
222 222
223BOOL LLPipeline::sPickAvatar = TRUE;
223BOOL LLPipeline::sDynamicLOD = TRUE; 224BOOL LLPipeline::sDynamicLOD = TRUE;
224BOOL LLPipeline::sShowHUDAttachments = TRUE; 225BOOL LLPipeline::sShowHUDAttachments = TRUE;
225BOOL LLPipeline::sRenderPhysicalBeacons = TRUE; 226BOOL LLPipeline::sRenderPhysicalBeacons = TRUE;
@@ -2342,7 +2343,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
2342 } 2343 }
2343 } 2344 }
2344 2345
2345 2346 LLAppViewer::instance()->pingMainloopTimeout("Pipeline:ForceVBO");
2346 2347
2347 //by bao 2348 //by bao
2348 //fake vertex buffer updating 2349 //fake vertex buffer updating
@@ -2389,12 +2390,16 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
2389 2390
2390 U32 cur_type = 0; 2391 U32 cur_type = 0;
2391 2392
2393 LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDrawPools");
2394
2392 if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING)) 2395 if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING))
2393 { 2396 {
2397 LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect");
2394 gObjectList.renderObjectsForSelect(camera, gViewerWindow->getVirtualWindowRect()); 2398 gObjectList.renderObjectsForSelect(camera, gViewerWindow->getVirtualWindowRect());
2395 } 2399 }
2396 else if (gSavedSettings.getBOOL("RenderDeferred")) 2400 else if (gSavedSettings.getBOOL("RenderDeferred"))
2397 { 2401 {
2402 LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDeferred");
2398 renderGeomDeferred(); 2403 renderGeomDeferred();
2399 } 2404 }
2400 else 2405 else
@@ -2482,6 +2487,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
2482 stop_glerror(); 2487 stop_glerror();
2483 } 2488 }
2484 } 2489 }
2490
2491 LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDrawPoolsEnd");
2485 2492
2486 LLVertexBuffer::unbind(); 2493 LLVertexBuffer::unbind();
2487 LLGLState::checkStates(); 2494 LLGLState::checkStates();
@@ -2505,6 +2512,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
2505 LLGLState::checkTextureChannels(); 2512 LLGLState::checkTextureChannels();
2506 LLGLState::checkClientArrays(); 2513 LLGLState::checkClientArrays();
2507 2514
2515 LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderHighlights");
2516
2508 if (!sReflectionRender) 2517 if (!sReflectionRender)
2509 { 2518 {
2510 renderHighlights(); 2519 renderHighlights();
@@ -2514,6 +2523,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
2514 // have touch-handlers. 2523 // have touch-handlers.
2515 mHighlightFaces.clear(); 2524 mHighlightFaces.clear();
2516 2525
2526 LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDebug");
2527
2517 renderDebug(); 2528 renderDebug();
2518 2529
2519 LLVertexBuffer::unbind(); 2530 LLVertexBuffer::unbind();
@@ -2526,6 +2537,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
2526 gObjectList.resetObjectBeacons(); 2537 gObjectList.resetObjectBeacons();
2527 } 2538 }
2528 2539
2540 LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomEnd");
2541
2529 //HACK: preserve/restore matrices around HUD render 2542 //HACK: preserve/restore matrices around HUD render
2530 if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD)) 2543 if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
2531 { 2544 {
@@ -4022,6 +4035,8 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector3& start,
4022 4035
4023 LLVector3 position; 4036 LLVector3 position;
4024 4037
4038 sPickAvatar = LLToolMgr::getInstance()->inBuildMode() ? FALSE : TRUE;
4039
4025 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin(); 4040 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin();
4026 iter != LLWorld::getInstance()->getRegionList().end(); ++iter) 4041 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
4027 { 4042 {
@@ -4048,6 +4063,31 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector3& start,
4048 } 4063 }
4049 } 4064 }
4050 } 4065 }
4066
4067 if (!sPickAvatar)
4068 {
4069 if (!drawable || !drawable->getVObj()->isAttachment())
4070 { //check against avatars
4071 sPickAvatar = TRUE;
4072 for (LLWorld::region_list_t::iterator iter = LLWorld::getInstance()->getRegionList().begin();
4073 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
4074 {
4075 LLViewerRegion* region = *iter;
4076
4077 LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_BRIDGE);
4078 if (part && hasRenderType(part->mDrawableType))
4079 {
4080 LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, face_hit, &position, tex_coord, normal, bi_normal);
4081 if (hit)
4082 {
4083 drawable = hit;
4084 local_end = position;
4085 }
4086 }
4087 }
4088 }
4089 }
4090
4051 4091
4052 //check all avatar nametags (silly, isn't it?) 4092 //check all avatar nametags (silly, isn't it?)
4053 for (std::vector< LLCharacter* >::iterator iter = LLCharacter::sInstances.begin(); 4093 for (std::vector< LLCharacter* >::iterator iter = LLCharacter::sInstances.begin();