diff options
author | Tofu Buzzard <no-email> | 2011-02-01 08:41:44 -0800 |
---|---|---|
committer | Tofu Buzzard <no-email> | 2011-02-01 08:41:44 -0800 |
commit | 622c5f11306c88055fc1be0a290041ef7e3394a4 (patch) | |
tree | f76dff733a690adaa173b7c3f66b78bcf4fc5dfd /indra | |
parent | 489a01181da4f599eb4d0520636278be3ceac2bc (diff) | |
parent | ee39db49a38a626e72e1924e4c157b16d90e8ee6 (diff) |
merge
Diffstat (limited to 'indra')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llagentpilot.cpp | 10 | ||||
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llmeshrepository.h | 2 | ||||
-rw-r--r-- | indra/newview/llpanelobject.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 3 |
6 files changed, 35 insertions, 5 deletions
diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp index 13e1023185..afeba6bdf0 100644..100755 --- a/indra/newview/llagentpilot.cpp +++ b/indra/newview/llagentpilot.cpp @@ -178,6 +178,8 @@ void LLAgentPilot::stopPlayback() } } +#define SKIP_PILOT_LOGGING 1 + void LLAgentPilot::updateTarget() { if (mPlaying) @@ -195,7 +197,9 @@ void LLAgentPilot::updateTarget() { if (!mStarted) { +#if SKIP_PILOT_LOGGING llinfos << "At start, beginning playback" << llendl; +#endif mTimer.reset(); mStarted = TRUE; } @@ -218,17 +222,23 @@ void LLAgentPilot::updateTarget() { if ((mNumRuns < 0) || (mNumRuns > 0)) { +#if SKIP_PILOT_LOGGING llinfos << "Looping, restarting playback" << llendl; +#endif startPlayback(); } else if (mQuitAfterRuns) { +#if SKIP_PILOT_LOGGING llinfos << "Done with all runs, quitting viewer!" << llendl; +#endif LLAppViewer::instance()->forceQuit(); } else { +#if SKIP_PILOT_LOGGING llinfos << "Done with all runs, disabling pilot" << llendl; +#endif stopPlayback(); } } diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 4e25a13af2..b46b368452 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2160,7 +2160,7 @@ S32 LLMeshRepository::update() return size ; } -S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 detail) +S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 detail, S32 last_lod) { if (detail < 0 || detail > 4) { @@ -2201,7 +2201,19 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para if (group) { - //first see what the next lowest LOD available might be + //first, see if last_lod is available (don't transition down to avoid funny popping a la SH-641) + if (last_lod >= 0) + { + LLVolume* lod = group->refLOD(last_lod); + if (lod && !lod->isTetrahedron() && lod->getNumVolumeFaces() > 0) + { + group->derefLOD(lod); + return last_lod; + } + group->derefLOD(lod); + } + + //next, see what the next lowest LOD available might be for (S32 i = detail-1; i >= 0; --i) { LLVolume* lod = group->refLOD(i); diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index eccb82b661..b642a89192 100644 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -456,7 +456,7 @@ public: S32 update() ; //mesh management functions - S32 loadMesh(LLVOVolume* volume, const LLVolumeParams& mesh_params, S32 detail = 0); + S32 loadMesh(LLVOVolume* volume, const LLVolumeParams& mesh_params, S32 detail = 0, S32 last_lod = -1); void notifyLoadedMeshes(); void notifyMeshLoaded(const LLVolumeParams& mesh_params, LLVolume* volume); diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index b60eb893c7..8fa6beb474 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -1934,7 +1934,7 @@ void LLPanelObject::refresh() getChildView("Physics Density")->setVisible(enable_mesh); getChildView("Physics Restitution")->setVisible(enable_mesh); - F32 max_scale = get_default_max_prim_scale(); + F32 max_scale = DEFAULT_MAX_PRIM_SCALE_NO_MESH; getChild<LLSpinCtrl>("Scale X")->setMaxValue(max_scale); getChild<LLSpinCtrl>("Scale Y")->setMaxValue(max_scale); getChild<LLSpinCtrl>("Scale Z")->setMaxValue(max_scale); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 9bf0ae7c3e..414036c597 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -372,6 +372,12 @@ static bool handleRenderDynamicLODChanged(const LLSD& newvalue) return true; } +static bool handleRenderLocalLightsChanged(const LLSD& newvalue) +{ + gPipeline.setLightingDetail(-1); + return true; +} + static bool handleRenderDeferredChanged(const LLSD& newvalue) { LLRenderTarget::sUseFBO = newvalue.asBoolean(); @@ -592,6 +598,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderFogRatio")->getSignal()->connect(boost::bind(&handleFogRatioChanged, _2)); gSavedSettings.getControl("RenderMaxPartCount")->getSignal()->connect(boost::bind(&handleMaxPartCountChanged, _2)); gSavedSettings.getControl("RenderDynamicLOD")->getSignal()->connect(boost::bind(&handleRenderDynamicLODChanged, _2)); + gSavedSettings.getControl("RenderLocalLights")->getSignal()->connect(boost::bind(&handleRenderLocalLightsChanged, _2)); gSavedSettings.getControl("RenderDebugTextureBind")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 3dc82f5368..b296d21b2b 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -936,6 +936,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo {
LLVolumeParams volume_params = params_in;
+ S32 last_lod = mVolumep.notNull() ? LLVolumeLODGroup::getVolumeDetailFromScale(mVolumep->getDetail()) : -1;
S32 lod = mLOD;
BOOL is404 = FALSE;
@@ -1014,7 +1015,7 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms_in, const S32 detail, bo {
//load request not yet issued, request pipeline load this mesh
LLUUID asset_id = volume_params.getSculptID();
- S32 available_lod = gMeshRepo.loadMesh(this, volume_params, lod);
+ S32 available_lod = gMeshRepo.loadMesh(this, volume_params, lod, last_lod);
if (available_lod != lod)
{
LLPrimitive::setVolume(volume_params, available_lod);
|