summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lldrawpool.cpp7
-rw-r--r--indra/newview/llreflectionmap.cpp35
-rw-r--r--indra/newview/llversioninfo.cpp2
-rw-r--r--indra/newview/llviewercamera.cpp14
-rw-r--r--indra/newview/llviewercamera.h5
-rw-r--r--indra/newview/llviewerobject.h1
-rwxr-xr-xindra/newview/llviewerregion.cpp6
-rw-r--r--indra/newview/llviewerwindow.cpp12
-rw-r--r--indra/newview/llviewerwindow.h2
-rw-r--r--indra/newview/llvovolume.h2
-rw-r--r--indra/newview/pipeline.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml8
12 files changed, 46 insertions, 50 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 9ba4f7f300..739975eab4 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -756,9 +756,12 @@ void LLRenderPass::pushGLTFBatch(LLDrawInfo& params)
{
auto& mat = params.mGLTFMaterial;
- mat->bind(params.mTexture);
+ if (mat.notNull())
+ {
+ mat->bind(params.mTexture);
+ }
- LLGLDisable cull_face(mat->mDoubleSided ? GL_CULL_FACE : 0);
+ LLGLDisable cull_face(mat.notNull() && mat->mDoubleSided ? GL_CULL_FACE : 0);
setup_texture_matrix(params);
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index 79c07d8c09..31fd6f3f07 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -251,32 +251,27 @@ bool LLReflectionMap::getBox(LLMatrix4& box)
if (mViewerObject)
{
LLVolume* volume = mViewerObject->getVolume();
- if (volume)
+ if (volume && mViewerObject->getReflectionProbeIsBox())
{
- LLVOVolume* vobjp = (LLVOVolume*)mViewerObject;
-
- if (vobjp->getReflectionProbeIsBox())
+ glh::matrix4f mv(gGLModelView);
+ glh::matrix4f scale;
+ LLVector3 s = mViewerObject->getScale().scaledVec(LLVector3(0.5f, 0.5f, 0.5f));
+ mRadius = s.magVec();
+ scale.set_scale(glh::vec3f(s.mV));
+ if (mViewerObject->mDrawable != nullptr)
{
- glh::matrix4f mv(gGLModelView);
- glh::matrix4f scale;
- LLVector3 s = vobjp->getScale().scaledVec(LLVector3(0.5f, 0.5f, 0.5f));
- mRadius = s.magVec();
- scale.set_scale(glh::vec3f(s.mV));
- if (vobjp->mDrawable != nullptr)
- {
- // object to agent space (no scale)
- glh::matrix4f rm((F32*)vobjp->mDrawable->getWorldMatrix().mMatrix);
+ // object to agent space (no scale)
+ glh::matrix4f rm((F32*)mViewerObject->mDrawable->getWorldMatrix().mMatrix);
- // construct object to camera space (with scale)
- mv = mv * rm * scale;
+ // construct object to camera space (with scale)
+ mv = mv * rm * scale;
- // inverse is camera space to object unit cube
- mv = mv.inverse();
+ // inverse is camera space to object unit cube
+ mv = mv.inverse();
- box = LLMatrix4(mv.m);
+ box = LLMatrix4(mv.m);
- return true;
- }
+ return true;
}
}
}
diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp
index c3dc07f357..a571b5544b 100644
--- a/indra/newview/llversioninfo.cpp
+++ b/indra/newview/llversioninfo.cpp
@@ -135,7 +135,7 @@ LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity()
std::string channel = getChannel();
static const boost::regex is_test_channel("\\bTest\\b");
- static const boost::regex is_beta_channel("\\bBeta\\b");
+ static const boost::regex is_beta_channel("\\b(Beta|Develop)\\b"); // Develop is an alias for Beta
static const boost::regex is_project_channel("\\bProject\\b");
static const boost::regex is_release_channel("\\bRelease\\b");
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index a070711727..ab7953846f 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -94,7 +94,13 @@ LLViewerCamera::LLViewerCamera() : LLCamera()
mZoomSubregion = 1;
mAverageSpeed = 0.f;
mAverageAngularSpeed = 0.f;
- gSavedSettings.getControl("CameraAngle")->getCommitSignal()->connect(boost::bind(&LLViewerCamera::updateCameraAngle, this, _2));
+
+ mCameraAngleChangedSignal = gSavedSettings.getControl("CameraAngle")->getCommitSignal()->connect(boost::bind(&LLViewerCamera::updateCameraAngle, this, _2));
+}
+
+LLViewerCamera::~LLViewerCamera()
+{
+ mCameraAngleChangedSignal.disconnect();
}
void LLViewerCamera::updateCameraLocation(const LLVector3 &center, const LLVector3 &up_direction, const LLVector3 &point_of_interest)
@@ -895,10 +901,8 @@ bool LLViewerCamera::isDefaultFOVChanged()
return false;
}
-// static
-void LLViewerCamera::updateCameraAngle( void* user_data, const LLSD& value)
+void LLViewerCamera::updateCameraAngle(const LLSD& value)
{
- LLViewerCamera* self=(LLViewerCamera*)user_data;
- self->setDefaultFOV(value.asReal());
+ setDefaultFOV(value.asReal());
}
diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h
index 6d8fb2a520..a204b85d88 100644
--- a/indra/newview/llviewercamera.h
+++ b/indra/newview/llviewercamera.h
@@ -43,6 +43,7 @@ class alignas(16) LLViewerCamera : public LLCamera, public LLSimpleton<LLViewerC
LL_ALIGN_NEW
public:
LLViewerCamera();
+ ~LLViewerCamera();
typedef enum
{
@@ -65,7 +66,7 @@ public:
const LLVector3 &point_of_interest);
static void updateFrustumPlanes(LLCamera& camera, bool ortho = false, bool zflip = false, bool no_hacks = false);
- static void updateCameraAngle(void* user_data, const LLSD& value);
+ void updateCameraAngle(const LLSD& value);
void setPerspective(bool for_selection, S32 x, S32 y_from_bot, S32 width, S32 height, bool limit_select_distance, F32 z_near = 0, F32 z_far = 0);
const LLMatrix4 &getProjection() const;
@@ -125,6 +126,8 @@ protected:
F32 mZoomFactor;
S16 mZoomSubregion;
+ boost::signals2::connection mCameraAngleChangedSignal;
+
public:
};
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index b96a1a6644..09584d22a8 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -266,6 +266,7 @@ public:
virtual bool isRiggedMesh() const { return false; }
virtual bool hasLightTexture() const { return false; }
virtual bool isReflectionProbe() const { return false; }
+ virtual bool getReflectionProbeIsBox() const { return false; }
// This method returns true if the object is over land owned by
// the agent, one of its groups, or it encroaches and
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 87eddefcba..19a1990665 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -2854,7 +2854,11 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss
if(entry->isState(LLVOCacheEntry::ACTIVE))
{
- ((LLDrawable*)entry->getEntry()->getDrawable())->getVObj()->loadFlags(flags);
+ LLDrawable* drawable = (LLDrawable*)entry->getEntry()->getDrawable();
+ if (drawable && drawable->getVObj())
+ {
+ drawable->getVObj()->loadFlags(flags);
+ }
return true;
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 70aee2dc43..cfa12bf178 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1867,15 +1867,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
U32 max_core_count = gSavedSettings.getU32("EmulateCoreCount");
F32 max_gl_version = gSavedSettings.getF32("RenderMaxOpenGLVersion");
- LLControlVariable* vram_control = gSavedSettings.getControl("RenderMaxVRAMBudget");
- U32 max_vram = vram_control->getValue().asInteger();
- mMaxVRAMControlConnection = vram_control->getSignal()->connect(
- [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val)
- {
- if (mWindow) mWindow->setMaxVRAMMegabytes(new_val.asInteger());
- });
-
-
mWindow = LLWindowManager::createWindow(this,
p.title, p.name, p.x, p.y, p.width, p.height, 0,
p.fullscreen,
@@ -1885,7 +1876,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
p.ignore_pixel_depth,
0,
max_core_count,
- max_vram,
max_gl_version); //don't use window level anti-aliasing
if (NULL == mWindow)
@@ -2436,8 +2426,6 @@ LLViewerWindow::~LLViewerWindow()
LLViewerShaderMgr::releaseInstance();
LLViewerShaderMgr::sInitialized = false;
}
-
- mMaxVRAMControlConnection.disconnect();
}
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 5cd6aacdb2..4a6b901b33 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -550,8 +550,6 @@ private:
// Object temporarily hovered over while dragging
LLPointer<LLViewerObject> mDragHoveredObject;
- boost::signals2::connection mMaxVRAMControlConnection;
-
static LLTrace::SampleStatHandle<> sMouseVelocityStat;
};
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index a004dab8c9..07e02e042c 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -306,7 +306,7 @@ public:
bool isReflectionProbe() const override;
F32 getReflectionProbeAmbiance() const;
F32 getReflectionProbeNearClip() const;
- bool getReflectionProbeIsBox() const;
+ bool getReflectionProbeIsBox() const override;
bool getReflectionProbeIsDynamic() const;
bool getReflectionProbeIsMirror() const;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 4819ea4346..f9ff8217af 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -10229,7 +10229,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool
result.clear();
grabReferences(result);
- if (!avatar || !avatar->mDrawable)
+ if (!avatar || avatar->isDead() || !avatar->mDrawable)
{
LL_WARNS_ONCE("AvatarRenderPipeline") << "Avatar is " << (avatar ? "not drawable" : "null") << LL_ENDL;
return;
diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
index cc4f80a15c..a80b1e1c13 100644
--- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
+++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
- height="400"
+ height="411"
layout="topleft"
name="prefs_graphics_advanced"
help_topic="Preferences_Graphics_Advanced"
@@ -545,7 +545,7 @@
</text>
<view_border
bevel_style="in"
- height="322"
+ height="357"
layout="topleft"
left="385"
name="vert_border"
@@ -889,7 +889,7 @@
layout="topleft"
left="13"
name="horiz_border"
- top="338"
+ top="373"
top_delta="5"
width="774"/>
<button
@@ -899,7 +899,7 @@
layout="topleft"
left="20"
name="Defaults"
- top_delta="20"
+ top_delta="7"
width="210">
<button.commit_callback
function="Pref.HardwareDefaults" />