diff options
author | Dave Parks <davep@lindenlab.com> | 2010-07-14 11:11:31 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-07-14 11:11:31 -0500 |
commit | 13202e744c35f0c6154cd0b582b1834896cacb79 (patch) | |
tree | 6a78237dd74c6270201afb6921e34e0b81dcfad5 /indra/newview/llviewerwindow.cpp | |
parent | b46fff1ba1450d14424e676f31c0cacd921bedb0 (diff) | |
parent | 2dd3a6be720ed6ce7c17415fc8d81869cf46f3a0 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 74 |
1 files changed, 69 insertions, 5 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2f63e7ef01..67dbe3e52b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -31,7 +31,6 @@ */ #include "llviewerprecompiledheaders.h" - #include "llviewerwindow.h" #if LL_WINDOWS @@ -47,6 +46,7 @@ #include "llagent.h" #include "llagentcamera.h" #include "llfloaterreg.h" +#include "llmeshrepository.h" #include "llpanellogin.h" #include "llviewerkeyboard.h" #include "llviewermenu.h" @@ -230,6 +230,8 @@ LLVector2 gDebugRaycastTexCoord; LLVector3 gDebugRaycastNormal; LLVector3 gDebugRaycastBinormal; S32 gDebugRaycastFaceHit; +LLVector3 gDebugRaycastStart; +LLVector3 gDebugRaycastEnd; // HUD display lines in lower right BOOL gDisplayWindInfo = FALSE; @@ -320,7 +322,7 @@ public: mTextColor = LLColor4( 0.86f, 0.86f, 0.86f, 1.f ); // Draw stuff growing up from right lower corner of screen - U32 xpos = mWindow->getWindowWidthScaled() - 350; + U32 xpos = mWindow->getWorldViewWidthScaled() - 350; U32 ypos = 64; const U32 y_inc = 20; @@ -585,6 +587,54 @@ public: ypos += y_inc; } } + + + if (gSavedSettings.getBOOL("DebugShowUploadCost")) + { +#if LL_MESH_ENABLED + addText(xpos, ypos, llformat(" Meshes: L$%d", gPipeline.mDebugMeshUploadCost)); + ypos += y_inc/2; +#endif + addText(xpos, ypos, llformat(" Sculpties: L$%d", gPipeline.mDebugSculptUploadCost)); + ypos += y_inc/2; + addText(xpos, ypos, llformat(" Textures: L$%d", gPipeline.mDebugTextureUploadCost)); + ypos += y_inc/2; + addText(xpos, ypos, "Upload Cost: "); + + ypos += y_inc; + } + +#if LL_MESH_ENABLED + //temporary hack to give feedback on mesh upload progress + if (!gMeshRepo.mUploads.empty()) + { + for (std::vector<LLMeshUploadThread*>::iterator iter = gMeshRepo.mUploads.begin(); + iter != gMeshRepo.mUploads.end(); ++iter) + { + LLMeshUploadThread* thread = *iter; + + addText(xpos, ypos, llformat("Mesh Upload -- price quote: %d:%d | upload: %d:%d | create: %d", + thread->mPendingConfirmations, thread->mUploadQ.size()+thread->mTextureQ.size(), + thread->mPendingUploads, thread->mConfirmedQ.size()+thread->mConfirmedTextureQ.size(), + thread->mInstanceQ.size())); + ypos += y_inc; + } + } + + S32 pending = (S32) gMeshRepo.mPendingRequests.size(); + S32 header = (S32) gMeshRepo.mThread->mHeaderReqQ.size(); + S32 lod = (S32) gMeshRepo.mThread->mLODReqQ.size(); + + if (pending + header + lod + LLMeshRepoThread::sActiveHeaderRequests + LLMeshRepoThread::sActiveLODRequests != 0) + { + addText(xpos, ypos, llformat ("Mesh Queue - %d pending (%d:%d header | %d:%d LOD)", + pending, + LLMeshRepoThread::sActiveHeaderRequests, header, + LLMeshRepoThread::sActiveLODRequests, lod)); + + ypos += y_inc; + } +#endif } void draw() @@ -2450,7 +2500,9 @@ void LLViewerWindow::updateUI() &gDebugRaycastIntersection, &gDebugRaycastTexCoord, &gDebugRaycastNormal, - &gDebugRaycastBinormal); + &gDebugRaycastBinormal, + &gDebugRaycastStart, + &gDebugRaycastEnd); } updateMouseDelta(); @@ -3395,7 +3447,9 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de LLVector3 *intersection, LLVector2 *uv, LLVector3 *normal, - LLVector3 *binormal) + LLVector3 *binormal, + LLVector3* start, + LLVector3* end) { S32 x = mouse_x; S32 y = mouse_y; @@ -3427,7 +3481,16 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de LLVector3 mouse_world_start = mouse_point_global; LLVector3 mouse_world_end = mouse_point_global + mouse_direction_global * depth; - + if (start) + { + *start = mouse_world_start; + } + + if (end) + { + *end = mouse_world_end; + } + LLViewerObject* found = NULL; if (this_object) // check only this object @@ -4466,6 +4529,7 @@ BOOL LLViewerWindow::changeDisplaySettings(LLCoordScreen size, BOOL disable_vsyn //gResizeScreenTexture = TRUE; + //U32 fsaa = gSavedSettings.getU32("RenderFSAASamples"); //U32 old_fsaa = mWindow->getFSAASamples(); |