summaryrefslogtreecommitdiff
path: root/indra/newview/lllocalgltfmaterials.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-06-10 16:22:12 -0700
committerBrad Linden <brad@lindenlab.com>2024-06-10 16:22:12 -0700
commit7c42711ca3a4e67b95473aa5129dce5ff19bea15 (patch)
tree593c0bedf07bffc79ec4640b157839edf61260f5 /indra/newview/lllocalgltfmaterials.cpp
parente0e6e7fd747121442370fc811c84aa34ed612f64 (diff)
parent9f6b8484dfb7dfa981d8a8ac3693d3f68e32bc12 (diff)
Merge remote-tracking branch 'origin/DRTVWR-600-maint-A' into project/gltf_development
Diffstat (limited to 'indra/newview/lllocalgltfmaterials.cpp')
-rw-r--r--indra/newview/lllocalgltfmaterials.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/lllocalgltfmaterials.cpp b/indra/newview/lllocalgltfmaterials.cpp
index 0740e1289a..fab18f2d26 100644
--- a/indra/newview/lllocalgltfmaterials.cpp
+++ b/indra/newview/lllocalgltfmaterials.cpp
@@ -1,25 +1,25 @@
-/**
+/**
* @file lllocalrendermaterials.cpp
* @brief Local GLTF materials source
*
* $LicenseInfo:firstyear=2022&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2022, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -51,14 +51,14 @@
/*=======================================*/
/* Formal declarations, constants, etc. */
-/*=======================================*/
+/*=======================================*/
static const F32 LL_LOCAL_TIMER_HEARTBEAT = 3.0;
static const S32 LL_LOCAL_UPDATE_RETRIES = 5;
/*=======================================*/
/* LLLocalGLTFMaterial: unit class */
-/*=======================================*/
+/*=======================================*/
LLLocalGLTFMaterial::LLLocalGLTFMaterial(std::string filename, S32 index)
: mFilename(filename)
, mShortName(gDirUtilp->getBaseFileName(filename, true))
@@ -309,7 +309,7 @@ bool LLLocalGLTFMaterialTimer::isRunning()
bool LLLocalGLTFMaterialTimer::tick()
{
- // todo: do on idle? No point in timer
+ // todo: do on idle? No point in timer
LLLocalGLTFMaterialMgr::getInstance()->doUpdates();
return false;
}
@@ -346,19 +346,19 @@ S32 LLLocalGLTFMaterialMgr::addUnit(const std::string& filename)
tinygltf::Model model;
LLTinyGLTFHelper::loadModel(filename, model);
- S32 materials_in_file = model.materials.size();
+ auto materials_in_file = model.materials.size();
if (materials_in_file <= 0)
{
return 0;
}
S32 loaded_materials = 0;
- for (S32 i = 0; i < materials_in_file; i++)
+ for (size_t i = 0; i < materials_in_file; i++)
{
// Todo: this is rather inefficient, files will be spammed with
// separate loads and date checks, find a way to improve this.
// May be doUpdates() should be checking individual files.
- LLPointer<LLLocalGLTFMaterial> unit = new LLLocalGLTFMaterial(filename, i);
+ LLPointer<LLLocalGLTFMaterial> unit = new LLLocalGLTFMaterial(filename, static_cast<S32>(i));
// load material from file
if (unit->updateSelf())