Fixing some issues with high-res snapshots.

This commit is contained in:
Shyotl
2011-05-27 14:01:23 -05:00
parent 45d84f88ab
commit 2f3a8fb6c0
2 changed files with 17 additions and 1 deletions

View File

@@ -4344,6 +4344,21 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
image_width *= internal_scale;
#endif //shy_mod
//Hack until hud ui works in high-res shots again (nameplates and hud attachments are buggered).
if ((image_width > window_width || image_height > window_height))
{
if(LLPipeline::sShowHUDAttachments)
{
hide_hud=true;
LLPipeline::sShowHUDAttachments = FALSE;
}
if(show_ui)
{
show_ui=false;
LLPipeline::toggleRenderDebugFeature((void*)LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
}
if(!keep_window_aspect) //image cropping
{
F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ;
@@ -4535,7 +4550,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
gDepthDirty = TRUE;
// POST SNAPSHOT
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
if (prev_draw_ui != gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
LLPipeline::toggleRenderDebugFeature((void*)LLPipeline::RENDER_DEBUG_FEATURE_UI);
}

View File

@@ -4848,6 +4848,7 @@ void LLPipeline::enableLightsFullbright(const LLColor4& color)
void LLPipeline::disableLights()
{
enableLights(0); // no lighting (full bright)
glColor4f(1.f, 1.f, 1.f, 1.f);
}
//============================================================================