From 4b0b975e28622999fd9acc7b230c8cb5ecb31b37 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 24 Nov 2009 23:36:57 -0600 Subject: Merge cleanup. --- indra/newview/pipeline.cpp | 28 +++++++++------------------- indra/newview/pipeline.h | 4 +--- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e9ec523396..97c4340b4a 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -346,10 +346,7 @@ LLPipeline::LLPipeline() : mLightMovingMask(0), mLightingDetail(0), mScreenWidth(0), - mScreenHeight(0), - mViewportWidth(0), - mViewportHeight(0) - + mScreenHeight(0) { mNoiseMap = 0; mTrueNoiseMap = 0; @@ -517,8 +514,8 @@ void LLPipeline::resizeScreenTexture() LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE); if (gPipeline.canUseVertexShaders() && assertInitialized()) { - GLuint resX = gViewerWindow->getWorldViewWidth(); - GLuint resY = gViewerWindow->getWorldViewHeight(); + GLuint resX = gViewerWindow->getWorldViewWidthRaw(); + GLuint resY = gViewerWindow->getWorldViewHeightRaw(); allocateScreenBuffer(resX,resY); } @@ -527,10 +524,8 @@ void LLPipeline::resizeScreenTexture() void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) { bool screen_size_changed = resX != mScreenWidth || resY != mScreenHeight; - bool viewport_size_changed = viewport_width != mViewportWidth || viewport_height != mViewportHeight; - - if (!screen_size_changed - && !viewport_size_changed) + + if (!screen_size_changed) { // nothing to do return; @@ -539,14 +534,10 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) // remember these dimensions mScreenWidth = resX; mScreenHeight = resY; - mViewportWidth = viewport_width; - mViewportHeight = viewport_height; - - llinfos << "RESIZED SCREEN TEXTURE: " << resX << "x" << resY << llendl; - + U32 samples = gSavedSettings.getU32("RenderFSAASamples"); - U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor"); + if (res_mod > 1 && res_mod < resX && res_mod < resY) { resX /= res_mod; @@ -643,7 +634,6 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) mDeferredScreen.setSampleBuffer(&mSampleBuffer); } } - mSampleBuffer.setViewport(viewport_width, viewport_height); mScreen.setSampleBuffer(&mSampleBuffer); stop_glerror(); @@ -750,8 +740,8 @@ void LLPipeline::createGLBuffers() stop_glerror(); - GLuint resX = gViewerWindow->getWorldViewWidth(); - GLuint resY = gViewerWindow->getWorldViewHeight(); + GLuint resX = gViewerWindow->getWorldViewWidthRaw(); + GLuint resY = gViewerWindow->getWorldViewHeightRaw(); if (LLPipeline::sRenderGlow) { //screen space glow buffers diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 8b6de5d546..67004a5f2d 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -469,9 +469,7 @@ public: //screen texture U32 mScreenWidth; U32 mScreenHeight; - U32 mViewportWidth; - U32 mViewportHeight; - + LLRenderTarget mScreen; LLRenderTarget mUIScreen; LLRenderTarget mDeferredScreen; -- cgit v1.2.3