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.cpp153
1 files changed, 90 insertions, 63 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8dec9b9ba8..25ed853146 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -41,9 +41,9 @@
#include "llviewercontrol.h"
#include "llfasttimer.h"
#include "llfontgl.h"
-#include "llmemory.h"
#include "llmemtype.h"
#include "llnamevalue.h"
+#include "llpointer.h"
#include "llprimitive.h"
#include "llvolume.h"
#include "material_codes.h"
@@ -52,6 +52,7 @@
#include "llui.h"
#include "llglheaders.h"
#include "llrender.h"
+#include "llwindow.h" // swapBuffers()
// newview includes
#include "llagent.h"
@@ -65,7 +66,6 @@
#include "llface.h"
#include "llfeaturemanager.h"
#include "llfloatertelehub.h"
-#include "llframestats.h"
#include "llgldbg.h"
#include "llhudmanager.h"
#include "lllightconstants.h"
@@ -82,7 +82,7 @@
#include "llviewerparcelmgr.h"
#include "llviewerregion.h" // for audio debugging.
#include "llviewerwindow.h" // For getSpinAxis
-#include "llvoavatar.h"
+#include "llvoavatarself.h"
#include "llvoground.h"
#include "llvosky.h"
#include "llvotree.h"
@@ -93,8 +93,8 @@
#include "llvopartgroup.h"
#include "llworld.h"
#include "llcubemap.h"
-#include "lldebugmessagebox.h"
#include "llviewershadermgr.h"
+#include "llviewerstats.h"
#include "llviewerjoystick.h"
#include "llviewerdisplay.h"
#include "llwlparammanager.h"
@@ -121,8 +121,7 @@ const U32 REFLECTION_MAP_RES = 128;
const S32 MAX_OCCLUDER_COUNT = 2;
extern S32 gBoxFrame;
-extern BOOL gRenderLightGlows;
-extern BOOL gHideSelectedObjects;
+//extern BOOL gHideSelectedObjects;
extern BOOL gDisplaySwapBuffers;
extern BOOL gDebugGL;
@@ -317,7 +316,7 @@ LLPipeline::LLPipeline() :
void LLPipeline::init()
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT);
sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
@@ -337,7 +336,7 @@ void LLPipeline::init()
getPool(LLDrawPool::POOL_BUMP);
getPool(LLDrawPool::POOL_GLOW);
- mTrianglesDrawnStat.reset();
+ LLViewerStats::getInstance()->mTrianglesDrawnStat.reset();
resetFrameStats();
mRenderTypeMask = 0xffffffff; // All render types start on
@@ -466,8 +465,8 @@ void LLPipeline::resizeScreenTexture()
{
if (gPipeline.canUseVertexShaders() && assertInitialized())
{
- GLuint resX = gViewerWindow->getWindowDisplayWidth();
- GLuint resY = gViewerWindow->getWindowDisplayHeight();
+ GLuint resX = gViewerWindow->getWorldViewWidth();
+ GLuint resY = gViewerWindow->getWorldViewHeight();
U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
if (res_mod > 1 && res_mod < resX && res_mod < resY)
@@ -577,6 +576,7 @@ void LLPipeline::releaseGLBuffers()
void LLPipeline::createGLBuffers()
{
+ LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS);
assertInitialized();
updateRenderDeferred();
@@ -592,6 +592,9 @@ void LLPipeline::createGLBuffers()
stop_glerror();
+ GLuint resX = gViewerWindow->getWorldViewWidth();
+ GLuint resY = gViewerWindow->getWorldViewHeight();
+
if (LLPipeline::sRenderGlow)
{ //screen space glow buffers
const U32 glow_res = llmax(1,
@@ -601,13 +604,10 @@ void LLPipeline::createGLBuffers()
{
mGlow[i].allocate(512,glow_res,GL_RGBA,FALSE,FALSE);
}
- }
- GLuint resX = gViewerWindow->getWindowDisplayWidth();
- GLuint resY = gViewerWindow->getWindowDisplayHeight();
+ allocateScreenBuffer(resX,resY);
+ }
- allocateScreenBuffer(resX,resY);
-
if (sRenderDeferred)
{
mSunShadow[0].allocate(1024,1024, 0, TRUE, FALSE);
@@ -639,6 +639,7 @@ void LLPipeline::createGLBuffers()
void LLPipeline::restoreGL()
{
+ LLMemType mt_cb(LLMemType::MTYPE_PIPELINE_RESTORE_GL);
assertInitialized();
if (mVertexShadersEnabled)
@@ -693,6 +694,7 @@ BOOL LLPipeline::canUseWindLightShadersOnObjects() const
void LLPipeline::unloadShaders()
{
+ LLMemType mt_us(LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS);
LLViewerShaderMgr::instance()->unloadShaders();
mVertexShadersLoaded = 0;
@@ -724,6 +726,7 @@ S32 LLPipeline::getMaxLightingDetail() const
S32 LLPipeline::setLightingDetail(S32 level)
{
+ LLMemType mt_ld(LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL);
assertInitialized();
if (level < 0)
@@ -911,7 +914,7 @@ LLDrawPool* LLPipeline::getPoolFromTE(const LLTextureEntry* te, LLViewerImage* i
//static
U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerImage* imagep)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt_gpt(LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE);
if (!te || !imagep)
{
@@ -941,7 +944,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerImage* image
void LLPipeline::addPool(LLDrawPool *new_poolp)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt_a(LLMemType::MTYPE_PIPELINE_ADD_POOL);
assertInitialized();
mPools.insert(new_poolp);
addToQuickLookup( new_poolp );
@@ -949,7 +952,7 @@ void LLPipeline::addPool(LLDrawPool *new_poolp)
void LLPipeline::allocDrawable(LLViewerObject *vobj)
{
- LLMemType mt(LLMemType::MTYPE_DRAWABLE);
+ LLMemType mt_ad(LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE);
LLDrawable *drawable = new LLDrawable();
vobj->mDrawable = drawable;
@@ -1010,6 +1013,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
U32 LLPipeline::addObject(LLViewerObject *vobj)
{
+ LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT);
if (gNoRender)
{
return 0;
@@ -1030,7 +1034,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
void LLPipeline::createObjects(F32 max_dtime)
{
LLFastTimer ftm(LLFastTimer::FTM_GEO_UPDATE);
- LLMemType mt(LLMemType::MTYPE_DRAWABLE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS);
LLTimer update_timer;
@@ -1093,7 +1097,7 @@ void LLPipeline::resetFrameStats()
{
assertInitialized();
- mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f);
+ LLViewerStats::getInstance()->mTrianglesDrawnStat.addValue(mTrianglesDrawn/1000.f);
if (mBatchCount > 0)
{
@@ -1198,7 +1202,7 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
void LLPipeline::updateMove()
{
LLFastTimer t(LLFastTimer::FTM_UPDATE_MOVE);
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE);
if (gSavedSettings.getBOOL("FreezeTime"))
{
@@ -1352,7 +1356,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3&
void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip)
{
LLFastTimer t(LLFastTimer::FTM_CULL);
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt_uc(LLMemType::MTYPE_PIPELINE_UPDATE_CULL);
grabReferences(result);
@@ -1563,7 +1567,7 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority)
void LLPipeline::updateGeom(F32 max_dtime)
{
LLTimer update_timer;
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_UPDATE_GEOM);
LLPointer<LLDrawable> drawablep;
LLFastTimer t(LLFastTimer::FTM_GEO_UPDATE);
@@ -1666,7 +1670,7 @@ void LLPipeline::updateGeom(F32 max_dtime)
void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_VISIBLE);
if(!drawablep || drawablep->isDead())
{
return;
@@ -1686,7 +1690,7 @@ void LLPipeline::markVisible(LLDrawable *drawablep, LLCamera& camera)
void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt_mm(LLMemType::MTYPE_PIPELINE_MARK_MOVED);
if (!drawablep)
{
@@ -1732,7 +1736,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, BOOL damped_motion)
void LLPipeline::markShift(LLDrawable *drawablep)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_SHIFT);
if (!drawablep || drawablep->isDead())
{
@@ -1755,7 +1759,7 @@ void LLPipeline::markShift(LLDrawable *drawablep)
void LLPipeline::shiftObjects(const LLVector3 &offset)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS);
assertInitialized();
@@ -1795,7 +1799,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
void LLPipeline::markTextured(LLDrawable *drawablep)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_TEXTURED);
if (drawablep && !drawablep->isDead() && assertInitialized())
{
@@ -1805,7 +1809,7 @@ void LLPipeline::markTextured(LLDrawable *drawablep)
void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag, BOOL priority)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_REBUILD);
if (drawablep && !drawablep->isDead() && assertInitialized())
{
@@ -1851,7 +1855,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
LLFastTimer ftm(LLFastTimer::FTM_STATESORT);
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
//LLVertexBuffer::unbind();
@@ -1928,7 +1932,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
if (!sSkipUpdate && group->changeLOD())
{
for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i)
@@ -1942,16 +1946,17 @@ void LLPipeline::stateSort(LLSpatialGroup* group, LLCamera& camera)
void LLPipeline::stateSort(LLSpatialBridge* bridge, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
if (!sSkipUpdate && bridge->getSpatialGroup()->changeLOD())
{
- bridge->updateDistance(camera);
+ bool force_update = false;
+ bridge->updateDistance(camera, force_update);
}
}
void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_STATE_SORT);
if (!drawablep
|| drawablep->isDead()
@@ -1960,7 +1965,7 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
return;
}
- if (gHideSelectedObjects)
+ if (LLSelectMgr::getInstance()->mHideSelectedObjects)
{
if (drawablep->getVObj().notNull() &&
drawablep->getVObj()->isSelected())
@@ -2006,11 +2011,13 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
{
if (!drawablep->isActive())
{
- drawablep->updateDistance(camera);
+ bool force_update = false;
+ drawablep->updateDistance(camera, force_update);
}
else if (drawablep->isAvatar())
{
- drawablep->updateDistance(camera); // calls vobj->updateLOD() which calls LLVOAvatar::updateVisibility()
+ bool force_update = false;
+ drawablep->updateDistance(camera, force_update); // calls vobj->updateLOD() which calls LLVOAvatar::updateVisibility()
}
}
}
@@ -2178,7 +2185,7 @@ void renderSoundHighlights(LLDrawable* drawablep)
void LLPipeline::postSort(LLCamera& camera)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_POST_SORT);
LLFastTimer ftm(LLFastTimer::FTM_STATESORT_POSTSORT);
assertInitialized();
@@ -2372,6 +2379,7 @@ void LLPipeline::postSort(LLCamera& camera)
void render_hud_elements()
{
+ LLMemType mt_rhe(LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS);
LLFastTimer t(LLFastTimer::FTM_RENDER_UI);
gPipeline.disableLights();
@@ -2416,7 +2424,7 @@ void render_hud_elements()
void LLPipeline::renderHighlights()
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_HL);
assertInitialized();
@@ -2484,7 +2492,7 @@ void LLPipeline::renderHighlights()
void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_GEOM);
LLFastTimer t(LLFastTimer::FTM_RENDER_GEOMETRY);
assertInitialized();
@@ -2509,7 +2517,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
//
stop_glerror();
- gFrameStats.start(LLFrameStats::RENDER_SYNC);
LLVertexBuffer::unbind();
@@ -2535,7 +2542,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
if(forceVBOUpdate)
gSky.mVOSkyp->updateDummyVertexBuffer() ;
- gFrameStats.start(LLFrameStats::RENDER_GEOM);
// Initialize lots of GL state to "safe" values
glMatrixMode(GL_TEXTURE);
@@ -2570,9 +2576,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
stop_glerror();
LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDrawPools");
-
- LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect");
- LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderDeferred");
for (pool_set_t::iterator iter = mPools.begin(); iter != mPools.end(); ++iter)
{
LLDrawPool *poolp = *iter;
@@ -2584,6 +2587,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING))
{
+ LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect");
gObjectList.renderObjectsForSelect(camera, gViewerWindow->getVirtualWindowRect());
}
else
@@ -2647,6 +2651,10 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
glGetIntegerv(GL_MODELVIEW_STACK_DEPTH, &depth);
if (depth > 3)
{
+ if (gDebugSession)
+ {
+ ll_fail("GL matrix stack corrupted.");
+ }
llerrs << "GL matrix stack corrupted!" << llendl;
}
std::string msg = llformat("%s pass %d", gPoolNames[cur_type].c_str(), i);
@@ -2747,6 +2755,9 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
void LLPipeline::renderGeomDeferred(LLCamera& camera)
{
+ LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderGeomDeferred");
+
+ LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED);
LLFastTimer t(LLFastTimer::FTM_RENDER_GEOMETRY);
LLFastTimer t2(LLFastTimer::FTM_POOLS);
@@ -2848,6 +2859,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
{
+ LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF);
LLFastTimer t(LLFastTimer::FTM_POOLS);
U32 cur_type = 0;
@@ -2959,6 +2971,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
void LLPipeline::renderGeomShadow(LLCamera& camera)
{
+ LLMemType mt_rgs(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW);
U32 cur_type = 0;
LLGLEnable cull(GL_CULL_FACE);
@@ -3220,7 +3233,7 @@ void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects, BOOL render
stateSort((*iter)->mDrawable, *LLViewerCamera::getInstance());
}
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_RENDER_SELECT);
@@ -3295,7 +3308,7 @@ void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects, BOOL render
LLDrawable* drawable = vobj->mDrawable;
if (vobj->isDead() ||
vobj->isHUDAttachment() ||
- (gHideSelectedObjects && vobj->isSelected()) ||
+ (LLSelectMgr::getInstance()->mHideSelectedObjects && vobj->isSelected()) ||
drawable->isDead() ||
!hasRenderType(drawable->getRenderType()))
{
@@ -3385,7 +3398,7 @@ void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects, BOOL render
void LLPipeline::rebuildPools()
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS);
assertInitialized();
@@ -3425,7 +3438,7 @@ void LLPipeline::rebuildPools()
void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
{
- LLMemType mt(LLMemType::MTYPE_PIPELINE);
+ LLMemType mt(LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP);
assertInitialized();
@@ -4096,18 +4109,21 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
void LLPipeline::enableLights(U32 mask)
{
assertInitialized();
+
if (mLightingDetail == 0)
{
mask &= 0xf003; // sun and backlight only (and fullbright bit)
}
if (mLightMask != mask)
{
+ stop_glerror();
if (!mLightMask)
{
glEnable(GL_LIGHTING);
}
if (mask)
{
+ stop_glerror();
for (S32 i=0; i<8; i++)
{
if (mask & (1<<i))
@@ -4121,14 +4137,17 @@ void LLPipeline::enableLights(U32 mask)
glLightfv(GL_LIGHT0 + i, GL_DIFFUSE, LLColor4::black.mV);
}
}
+ stop_glerror();
}
else
{
glDisable(GL_LIGHTING);
}
+ stop_glerror();
mLightMask = mask;
LLColor4 ambient = gSky.getTotalAmbientColor();
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambient.mV);
+ stop_glerror();
}
}
@@ -4871,6 +4890,7 @@ void LLPipeline::resetVertexBuffers()
void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture)
{
+ LLMemType mt_ro(LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS);
assertInitialized();
glLoadMatrixd(gGLModelView);
gGLLastMatrix = NULL;
@@ -4959,6 +4979,7 @@ void LLPipeline::bindScreenToTexture()
void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{
+ LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM);
if (!(gPipeline.canUseVertexShaders() &&
sRenderGlow))
{
@@ -4979,8 +5000,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
LLVector2 tc1(0,0);
- LLVector2 tc2((F32) gViewerWindow->getWindowDisplayWidth()*2,
- (F32) gViewerWindow->getWindowDisplayHeight()*2);
+ LLVector2 tc2((F32) gViewerWindow->getWorldViewWidth()*2,
+ (F32) gViewerWindow->getWorldViewHeight()*2);
if (res_mod > 1)
{
@@ -5073,8 +5094,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
F32 minLum = llmax(gSavedSettings.getF32("RenderGlowMinLuminance"), 0.0f);
F32 maxAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha");
F32 warmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount");
- LLVector3 lumWeights = gSavedSettings.getVector3("RenderGlowLumWeights");
- LLVector3 warmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights");
+ LLVector3 lumWeights = gSavedSkinSettings.getVector3("RenderGlowLumWeights");
+ LLVector3 warmthWeights = gSavedSkinSettings.getVector3("RenderGlowWarmthWeights");
gGlowExtractProgram.uniform1f("minLuminance", minLum);
gGlowExtractProgram.uniform1f("maxExtractAlpha", maxAlpha);
gGlowExtractProgram.uniform3f("lumWeights", lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]);
@@ -5182,7 +5203,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
}
- gViewerWindow->setupViewport();
+ gGLViewport[0] = gViewerWindow->getWorldViewRect().mLeft;
+ gGLViewport[1] = gViewerWindow->getWorldViewRect().mBottom;
+ gGLViewport[2] = gViewerWindow->getWorldViewRect().getWidth();
+ gGLViewport[3] = gViewerWindow->getWorldViewRect().getHeight();
+ glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
gGL.flush();
@@ -5191,8 +5216,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
- tc2.setVec((F32) gViewerWindow->getWindowDisplayWidth(),
- (F32) gViewerWindow->getWindowDisplayHeight());
+ tc2.setVec((F32) gViewerWindow->getWorldViewWidth(),
+ (F32) gViewerWindow->getWorldViewHeight());
if (res_mod > 1)
{
@@ -5785,15 +5810,15 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
{
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
{
- LLVOAvatar* agent = gAgent.getAvatarObject();
+ LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
if (gAgent.getCameraAnimating() || gAgent.getCameraMode() != CAMERA_MODE_MOUSELOOK)
{
- agent = NULL;
+ avatar = NULL;
}
- if (agent)
+ if (avatar)
{
- agent->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
+ avatar->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
}
LLVertexBuffer::unbind();
@@ -5983,7 +6008,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
}
glClearColor(0.f, 0.f, 0.f, 0.f);
- gViewerWindow->setupViewport();
+ gViewerWindow->setup3DViewport();
mRenderTypeMask = type_mask;
LLDrawPoolWater::sNeedsReflectionUpdate = FALSE;
LLDrawPoolWater::sNeedsDistortionUpdate = FALSE;
@@ -5994,9 +6019,9 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLGLState::checkTextureChannels();
LLGLState::checkClientArrays();
- if (agent)
+ if (avatar)
{
- agent->updateAttachmentVisibility(gAgent.getCameraMode());
+ avatar->updateAttachmentVisibility(gAgent.getCameraMode());
}
}
}
@@ -6428,6 +6453,7 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu
void LLPipeline::generateImpostor(LLVOAvatar* avatar)
{
+ LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR);
LLGLState::checkStates();
LLGLState::checkTextureChannels();
LLGLState::checkClientArrays();
@@ -6668,3 +6694,4 @@ LLCullResult::sg_list_t::iterator LLPipeline::endAlphaGroups()
return sCull->endAlphaGroups();
}
+