summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/gltfscenemanager.cpp4
-rw-r--r--indra/newview/llfloatersnapshot.cpp22
-rw-r--r--indra/newview/llgltfmaterialpreviewmgr.cpp4
-rw-r--r--indra/newview/llhudrender.cpp2
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp4
-rw-r--r--indra/newview/llreflectionmap.cpp2
-rw-r--r--indra/newview/llsettingsvo.cpp4
-rw-r--r--indra/newview/llspatialpartition.cpp16
-rw-r--r--indra/newview/llviewercamera.cpp4
-rw-r--r--indra/newview/llviewertexture.cpp4
-rw-r--r--indra/newview/llviewertexture.h4
-rw-r--r--indra/newview/llvoavatar.cpp10
-rw-r--r--indra/newview/llvovolume.cpp16
-rw-r--r--indra/newview/pipeline.cpp30
-rw-r--r--indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml4
15 files changed, 57 insertions, 73 deletions
diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp
index f362fa51cb..737e1da7d1 100644
--- a/indra/newview/gltfscenemanager.cpp
+++ b/indra/newview/gltfscenemanager.cpp
@@ -975,9 +975,9 @@ void renderAssetDebug(LLViewerObject* obj, Asset* asset)
LLVector4a t;
agent_to_asset.affineTransform(gDebugRaycastStart, t);
- start = glm::make_vec4(t.getF32ptr());
+ start = vec4(t);
agent_to_asset.affineTransform(gDebugRaycastEnd, t);
- end = glm::make_vec4(t.getF32ptr());
+ end = vec4(t);
start.w = end.w = 1.0;
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index fb4537f22a..68b9e758a1 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -60,6 +60,10 @@ LLPanelSnapshot* LLFloaterSnapshot::Impl::getActivePanel(LLFloaterSnapshotBase*
{
LLSideTrayPanelContainer* panel_container = floater->getChild<LLSideTrayPanelContainer>("panel_container");
LLPanelSnapshot* active_panel = dynamic_cast<LLPanelSnapshot*>(panel_container->getCurrentPanel());
+ if (!active_panel)
+ {
+ LL_WARNS() << "No snapshot active panel, current panel index: " << panel_container->getCurrentPanelIndex() << LL_ENDL;
+ }
if (!ok_if_not_found)
{
llassert_always(active_panel != NULL);
@@ -643,20 +647,18 @@ void LLFloaterSnapshotBase::ImplBase::setWorking(bool working)
working_lbl->setVisible(working);
mFloater->getChild<LLUICtrl>("working_indicator")->setVisible(working);
- if (working)
- {
- const std::string panel_name = getActivePanel(mFloater, false)->getName();
- const std::string prefix = panel_name.substr(getSnapshotPanelPrefix().size());
- std::string progress_text = mFloater->getString(prefix + "_" + "progress_str");
- working_lbl->setValue(progress_text);
- }
-
// All controls should be disabled while posting.
mFloater->setCtrlsEnabled(!working);
- LLPanelSnapshot* active_panel = getActivePanel(mFloater);
- if (active_panel)
+ if (LLPanelSnapshot* active_panel = getActivePanel(mFloater))
{
active_panel->enableControls(!working);
+ if (working)
+ {
+ const std::string panel_name = active_panel->getName();
+ const std::string prefix = panel_name.substr(getSnapshotPanelPrefix().size());
+ std::string progress_text = mFloater->getString(prefix + "_" + "progress_str");
+ working_lbl->setValue(progress_text);
+ }
}
}
diff --git a/indra/newview/llgltfmaterialpreviewmgr.cpp b/indra/newview/llgltfmaterialpreviewmgr.cpp
index cf6b08797d..da1f1a466f 100644
--- a/indra/newview/llgltfmaterialpreviewmgr.cpp
+++ b/indra/newview/llgltfmaterialpreviewmgr.cpp
@@ -472,9 +472,9 @@ bool LLGLTFPreviewTexture::render()
gPipeline.setupHWLights();
glm::mat4 mat = get_current_modelview();
- glm::vec4 transformed_light_dir = glm::make_vec4(light_dir.mV);
+ glm::vec4 transformed_light_dir(light_dir);
transformed_light_dir = mat * transformed_light_dir;
- SetTemporarily<LLVector4> force_sun_direction_high_graphics(&gPipeline.mTransformedSunDir, LLVector4(glm::value_ptr(transformed_light_dir)));
+ SetTemporarily<LLVector4> force_sun_direction_high_graphics(&gPipeline.mTransformedSunDir, LLVector4(transformed_light_dir));
// Override lights to ensure the sun is always shining from a certain direction (low graphics)
// See also force_sun_direction_high_graphics and fixup_shader_constants
{
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 135fba7897..6850e57b94 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -106,7 +106,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw();
glm::ivec4 viewport(world_view_rect.mLeft, world_view_rect.mBottom, world_view_rect.getWidth(), world_view_rect.getHeight());
- glm::vec3 win_coord = glm::project(glm::make_vec3(render_pos.mV), get_current_modelview(), get_current_projection(), viewport);
+ glm::vec3 win_coord = glm::project(glm::vec3(render_pos), get_current_modelview(), get_current_projection(), viewport);
//fonts all render orthographically, set up projection``
gGL.matrixMode(LLRender::MM_PROJECTION);
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 4db0a5b59d..b8c12ce0b9 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -660,11 +660,11 @@ void LLPanelPrimMediaControls::updateShape()
for(; vert_it != vert_end; ++vert_it)
{
// project silhouette vertices into screen space
- glm::vec3 screen_vert(glm::make_vec3(vert_it->mV));
+ glm::vec3 screen_vert(*vert_it);
screen_vert = mul_mat4_vec3(mat, screen_vert);
// add to screenspace bounding box
- update_min_max(min, max, LLVector3(glm::value_ptr(screen_vert)));
+ update_min_max(min, max, LLVector3(screen_vert));
}
// convert screenspace bbox to pixels (in screen coords)
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index 1196d138e9..f3adb52d5e 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -259,7 +259,7 @@ bool LLReflectionMap::getBox(LLMatrix4& box)
glm::mat4 mv(get_current_modelview());
LLVector3 s = mViewerObject->getScale().scaledVec(LLVector3(0.5f, 0.5f, 0.5f));
mRadius = s.magVec();
- glm::mat4 scale = glm::scale(glm::make_vec3(s.mV));
+ glm::mat4 scale = glm::scale(glm::vec3(s));
if (mViewerObject->mDrawable != nullptr)
{
// object to agent space (no scale)
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 6f9d4a24bc..62df6cd275 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -1093,8 +1093,8 @@ void LLSettingsVOWater::applySpecial(void *ptarget, bool force)
LLVector4 waterPlane(enorm.x, enorm.y, enorm.z, -glm::dot(ep, enorm));
- norm = glm::make_vec3(gPipeline.mHeroProbeManager.mMirrorNormal.mV);
- p = glm::make_vec3(gPipeline.mHeroProbeManager.mMirrorPosition.mV);
+ norm = glm::vec3(gPipeline.mHeroProbeManager.mMirrorNormal);
+ p = glm::vec3(gPipeline.mHeroProbeManager.mMirrorPosition);
enorm = mul_mat4_vec3(invtrans, norm);
enorm = glm::normalize(enorm);
ep = mul_mat4_vec3(mat, p);
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index c56900d986..a90ff73578 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2615,12 +2615,8 @@ void renderTexturePriority(LLDrawable* drawable)
LLGLDisable blend(GL_BLEND);
- //LLViewerTexture* imagep = facep->getTexture();
- //if (imagep)
if (facep)
{
-
- //F32 vsize = imagep->mMaxVirtualSize;
F32 vsize = facep->getPixelArea();
if (vsize > sCurMaxTexPriority)
@@ -2646,18 +2642,6 @@ void renderTexturePriority(LLDrawable* drawable)
size.mul(0.5f);
size.add(LLVector4a(0.01f));
drawBox(center, size);
-
- /*S32 boost = imagep->getBoostLevel();
- if (boost>LLGLTexture::BOOST_NONE)
- {
- F32 t = (F32) boost / (F32) (LLGLTexture::BOOST_MAX_LEVEL-1);
- LLVector4 col = lerp(boost_cold, boost_hot, t);
- LLGLEnable blend_on(GL_BLEND);
- gGL.blendFunc(GL_SRC_ALPHA, GL_ONE);
- gGL.diffuseColor4fv(col.mV);
- drawBox(center, size);
- gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }*/
}
}
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index f5acc840be..6cf99b68b2 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -420,7 +420,7 @@ bool LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw();
glm::ivec4 viewport(world_view_rect.mLeft, world_view_rect.mBottom, world_view_rect.getWidth(), world_view_rect.getHeight());
- glm::vec3 win_coord = glm::project(glm::make_vec3(pos_agent.mV), get_current_modelview(), get_current_projection(), viewport);
+ glm::vec3 win_coord = glm::project(glm::vec3(pos_agent), get_current_modelview(), get_current_projection(), viewport);
{
// convert screen coordinates to virtual UI coordinates
@@ -515,7 +515,7 @@ bool LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw();
glm::ivec4 viewport(world_view_rect.mLeft, world_view_rect.mBottom, world_view_rect.getWidth(), world_view_rect.getHeight());
- glm::vec3 win_coord = glm::project(glm::make_vec3(pos_agent.mV), get_current_modelview(), get_current_projection(), viewport);
+ glm::vec3 win_coord = glm::project(glm::vec3(pos_agent), get_current_modelview(), get_current_projection(), viewport);
{
win_coord.x /= gViewerWindow->getDisplayScale().mV[VX];
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 4996ae1c96..1084fb91da 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -2925,8 +2925,6 @@ LLViewerLODTexture::LLViewerLODTexture(const std::string& url, FTType f_type, co
void LLViewerLODTexture::init(bool firstinit)
{
mTexelsPerImage = 64*64;
- mDiscardVirtualSize = 0.f;
- mCalculatedDiscardLevel = -1.f;
}
//virtual
@@ -3007,8 +3005,6 @@ void LLViewerLODTexture::processTextureStats()
{
// Calculate the required scale factor of the image using pixels per texel
discard_level = (F32)(log(mTexelsPerImage / mMaxVirtualSize) / log_4);
- mDiscardVirtualSize = mMaxVirtualSize;
- mCalculatedDiscardLevel = discard_level;
}
discard_level = floorf(discard_level);
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 31b089226f..e1582c74bd 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -541,10 +541,6 @@ public:
private:
void init(bool firstinit) ;
-
-private:
- F32 mDiscardVirtualSize; // Virtual size used to calculate desired discard
- F32 mCalculatedDiscardLevel; // Last calculated discard level
};
//
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 2ef45442ee..f5dfcca873 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1944,8 +1944,8 @@ bool LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
glm::mat4 inverse = glm::inverse(mat);
glm::mat4 norm_mat = glm::transpose(inverse);
- glm::vec3 p1(glm::make_vec3(start.getF32ptr()));
- glm::vec3 p2(glm::make_vec3(end.getF32ptr()));
+ glm::vec3 p1(start);
+ glm::vec3 p2(end);
p1 = mul_mat4_vec3(inverse, p1);
p2 = mul_mat4_vec3(inverse, p2);
@@ -1953,12 +1953,12 @@ bool LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
LLVector3 position;
LLVector3 norm;
- if (linesegment_sphere(LLVector3(glm::value_ptr(p1)), LLVector3(glm::value_ptr(p2)), LLVector3(0,0,0), 1.f, position, norm))
+ if (linesegment_sphere(LLVector3(p1), LLVector3(p2), LLVector3(0,0,0), 1.f, position, norm))
{
- glm::vec3 res_pos(glm::make_vec3(position.mV));
+ glm::vec3 res_pos(position);
res_pos = mul_mat4_vec3(mat, res_pos);
- glm::vec3 res_norm(glm::make_vec3(norm.mV));
+ glm::vec3 res_norm(norm);
res_norm = glm::normalize(res_norm);
res_norm = glm::mat3(norm_mat) * res_norm;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a3e9e862fe..6e946f238b 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5739,7 +5739,12 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
continue;
}
- LLFetchedGLTFMaterial *gltf_mat = (LLFetchedGLTFMaterial*) facep->getTextureEntry()->getGLTFRenderMaterial();
+ LLFetchedGLTFMaterial* gltf_mat = nullptr;
+ const LLTextureEntry* te = facep->getTextureEntry();
+ if (te)
+ {
+ gltf_mat = (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial();
+ } // if not te, continue?
bool is_pbr = gltf_mat != nullptr;
if (is_pbr)
@@ -5801,10 +5806,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
cur_total += facep->getGeomCount();
- const LLTextureEntry* te = facep->getTextureEntry();
LLViewerTexture* tex = facep->getTexture();
- if (te->getGlow() > 0.f)
+ if (te && te->getGlow() > 0.f)
{
emissive = true;
}
@@ -5898,6 +5902,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
facep->mLastUpdateTime = gFrameTimeSeconds;
}
+ if (te)
{
LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial();
@@ -5962,6 +5967,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
add_face(sFullbrightFaces, fullbright_count, facep);
}
}
+ else // no texture entry
+ {
+ facep->setState(LLFace::FULLBRIGHT);
+ add_face(sFullbrightFaces, fullbright_count, facep);
+ }
}
}
else
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index b31c4faedd..362930a71e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8438,13 +8438,13 @@ void LLPipeline::renderDeferredLighting()
setupHWLights(); // to set mSun/MoonDir;
- glm::vec4 tc(glm::make_vec4(mSunDir.mV));
+ glm::vec4 tc(mSunDir);
tc = mat * tc;
- mTransformedSunDir.set(glm::value_ptr(tc));
+ mTransformedSunDir.set(tc);
- glm::vec4 tc_moon(glm::make_vec4(mMoonDir.mV));
+ glm::vec4 tc_moon(mMoonDir);
tc_moon = mat * tc_moon;
- mTransformedMoonDir.set(glm::value_ptr(tc_moon));
+ mTransformedMoonDir.set(tc_moon);
if ((RenderDeferredSSAO && !gCubeSnapshot) || RenderShadowDetail > 0)
{
@@ -8697,7 +8697,7 @@ void LLPipeline::renderDeferredLighting()
continue;
}
- glm::vec3 tc(glm::make_vec3(c));
+ glm::vec3 tc(center);
tc = mul_mat4_vec3(mat, tc);
fullscreen_lights.push_back(LLVector4(tc.x, tc.y, tc.z, s));
@@ -8804,13 +8804,12 @@ void LLPipeline::renderDeferredLighting()
LLDrawable* drawablep = *iter;
LLVOVolume* volume = drawablep->getVOVolume();
LLVector3 center = drawablep->getPositionAgent();
- F32* c = center.mV;
F32 light_size_final = volume->getLightRadius() * 1.5f;
F32 light_falloff_final = volume->getLightFalloff(DEFERRED_LIGHT_FALLOFF);
sVisibleLightCount++;
- glm::vec3 tc(glm::make_vec3(c));
+ glm::vec3 tc(center);
tc = mul_mat4_vec3(mat, tc);
setupSpotLight(gDeferredMultiSpotLightProgram, drawablep);
@@ -9951,10 +9950,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
LLVector3 lightDir = -caster_dir;
lightDir.normVec();
- glm::vec3 light_dir(glm::make_vec3(lightDir.mV));
-
//create light space camera matrix
-
LLVector3 at = lightDir;
LLVector3 up = camera.getAtAxis();
@@ -10006,9 +10002,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
//get good split distances for frustum
for (U32 i = 0; i < fp.size(); ++i)
{
- glm::vec3 v(glm::make_vec3(fp[i].mV));
+ glm::vec3 v(fp[i]);
v = mul_mat4_vec3(saved_view, v);
- fp[i].setVec(glm::value_ptr(v));
+ fp[i] = LLVector3(v);
}
min = fp[0];
@@ -10157,9 +10153,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
for (U32 i = 0; i < fp.size(); i++)
{
- glm::vec3 p = glm::make_vec3(fp[i].mV);
+ glm::vec3 p(fp[i]);
p = mul_mat4_vec3(view[j], p);
- wpf.push_back(LLVector3(glm::value_ptr(p)));
+ wpf.push_back(LLVector3(p));
}
min = wpf[0];
@@ -10360,19 +10356,19 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
view[j] = glm::inverse(view[j]);
//llassert(origin.isFinite());
- glm::vec3 origin_agent(glm::make_vec3(origin.mV));
+ glm::vec3 origin_agent(origin);
//translate view to origin
origin_agent = mul_mat4_vec3(view[j], origin_agent);
- eye = LLVector3(glm::value_ptr(origin_agent));
+ eye = LLVector3(origin_agent);
//llassert(eye.isFinite());
if (!hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot)
{
mShadowFrustOrigin[j] = eye;
}
- view[j] = look(LLVector3(glm::value_ptr(origin_agent)), lightDir, -up);
+ view[j] = look(LLVector3(origin_agent), lightDir, -up);
F32 fx = 1.f/tanf(fovx);
F32 fz = 1.f/tanf(fovz);
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 b789d9ed46..78d13293a8 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
@@ -126,7 +126,7 @@
layout="topleft"
top_delta="16"
left="30"
- width="130"
+ width="160"
name="MaxTextureResolutionLabel"
text_readonly_color="LabelDisabledColor">
Maximum LOD resolution:
@@ -135,7 +135,7 @@
control_name="RenderMaxTextureResolution"
height="19"
layout="topleft"
- left_pad="40"
+ left_pad="10"
top_delta="0"
name="MaxTextureResolution"
tool_tip="Maximum resolution for 'level of detail' textures"