diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2012-12-19 23:21:31 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2012-12-19 23:21:31 -0700 |
commit | 1fbd45672fcb1e5bfc194712fc7d0d4847a651cd (patch) | |
tree | 88c95c6cae2c615f8c08d707b1f73c4e57c7fd36 | |
parent | 4e22f3e3ef15e24d7e9e0ad156e60d4cd1b2d5c9 (diff) |
fix for SH-3640: Can not edit objects
-rw-r--r-- | indra/newview/llscenemonitor.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llscenemonitor.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp index 43f9e9208b..4872200f24 100644 --- a/indra/newview/llscenemonitor.cpp +++ b/indra/newview/llscenemonitor.cpp @@ -211,6 +211,7 @@ void LLSceneMonitor::unfreezeScene() void LLSceneMonitor::capture() { static U32 last_capture_time = 0; + if(last_capture_time == gFrameCount) { return; @@ -239,6 +240,11 @@ void LLSceneMonitor::capture() mNeedsUpdateDiff = TRUE; } +bool LLSceneMonitor::needsUpdate() const +{ + return mNeedsUpdateDiff; +} + void LLSceneMonitor::compare() { if(!mNeedsUpdateDiff) diff --git a/indra/newview/llscenemonitor.h b/indra/newview/llscenemonitor.h index ce25467a21..02e3d57d46 100644 --- a/indra/newview/llscenemonitor.h +++ b/indra/newview/llscenemonitor.h @@ -59,6 +59,7 @@ public: F32 getSamplingTime() const { return mSamplingTime;} F32 getDiffPixelRatio() const { return mDiffPixelRatio;} bool isEnabled()const {return mEnabled;} + bool needsUpdate() const; private: void freezeScene(); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 270ab26149..31b2220fc8 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1228,10 +1228,12 @@ void render_ui(F32 zoom_factor, int subfield) glh_set_current_modelview(glh_copy_matrix(gGLLastModelView)); } + if(LLSceneMonitor::getInstance()->needsUpdate()) { gGL.pushMatrix(); gViewerWindow->setup2DRender(); LLSceneMonitor::getInstance()->compare(); + gViewerWindow->setup3DRender(); gGL.popMatrix(); } |