diff options
author | Dave Parks <davep@lindenlab.com> | 2011-02-01 02:06:36 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-02-01 02:06:36 -0600 |
commit | d3bfbd8ebbaa2b891114de4dac52ba6cbcadce3b (patch) | |
tree | 864f18e0023220a9bf06e7f4dc27928ef002e16d /indra/newview/llfloatersnapshot.cpp | |
parent | faac42bca702d9b4126c3ca4b5656074dc7846f4 (diff) |
SH-483 Fix for varioius issues with hi-rez snapshots -- mainly disable the ability to take hi-rez snapshots if UI or HUD attachments are in the snapshot, and go back to old tile compositing method instead of using huge framebuffer objects.
Diffstat (limited to 'indra/newview/llfloatersnapshot.cpp')
-rw-r--r-- | indra/newview/llfloatersnapshot.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 0931f77281..add591895b 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1363,6 +1363,36 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) floater->getChildView("auto_snapshot_check")->setVisible( is_advance); floater->getChildView("image_quality_slider")->setVisible( is_advance && show_slider); + if (gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot")) + { //clamp snapshot resolution to window size when showing UI or HUD in snapshot + + LLSpinCtrl* width_ctrl = floater->getChild<LLSpinCtrl>("snapshot_width"); + LLSpinCtrl* height_ctrl = floater->getChild<LLSpinCtrl>("snapshot_height"); + + S32 width = gViewerWindow->getWindowWidthRaw(); + S32 height = gViewerWindow->getWindowHeightRaw(); + + width_ctrl->setMaxValue(width); + + height_ctrl->setMaxValue(height); + + if (width_ctrl->getValue().asInteger() > width) + { + width_ctrl->forceSetValue(width); + } + if (height_ctrl->getValue().asInteger() > height) + { + height_ctrl->forceSetValue(height); + } + } + else + { + LLSpinCtrl* width = floater->getChild<LLSpinCtrl>("snapshot_width"); + width->setMaxValue(6016); + LLSpinCtrl* height = floater->getChild<LLSpinCtrl>("snapshot_height"); + height->setMaxValue(6016); + } + LLSnapshotLivePreview* previewp = getPreviewView(floater); BOOL got_bytes = previewp && previewp->getDataSize() > 0; BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); @@ -1810,6 +1840,13 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL previewp->getSize(width, height); + if (gSavedSettings.getBOOL("RenderUIInSnapshot") || gSavedSettings.getBOOL("RenderHUDInSnapshot")) + { //clamp snapshot resolution to window size when showing UI or HUD in snapshot + width = llmin(width, gViewerWindow->getWindowWidthRaw()); + height = llmin(height, gViewerWindow->getWindowHeightRaw()); + } + + if(checkImageSize(previewp, width, height, TRUE, previewp->getMaxImageSize())) { resetSnapshotSizeOnUI(view, width, height) ; |