summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8bac5131cf..028a0db95c 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -436,7 +436,7 @@ void LLPipeline::init()
{
refreshCachedSettings();
- mRT = new RenderTargetPack();
+ mRT = &mMainRT;
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
gOctreeMinSize = gSavedSettings.getF32("OctreeMinimumNodeSize");
@@ -696,9 +696,6 @@ void LLPipeline::cleanup()
mDeferredVB = NULL;
mCubeVB = NULL;
-
- delete mRT;
- mRT = nullptr;
}
//============================================================================
@@ -840,6 +837,16 @@ LLPipeline::eFBOStatus LLPipeline::doAllocateScreenBuffer(U32 resX, U32 resY)
bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
+ if (mRT == &mMainRT)
+ { // hacky -- allocate auxillary buffer
+ gCubeSnapshot = TRUE;
+ mRT = &mAuxillaryRT;
+ U32 res = LL_REFLECTION_PROBE_RESOLUTION * 2;
+ allocateScreenBuffer(res, res, 0);
+ mRT = &mMainRT;
+ gCubeSnapshot = FALSE;
+ }
+
// remember these dimensions
mRT->width = resX;
mRT->height = resY;