summaryrefslogtreecommitdiff
path: root/indra/newview/lllocalgltfmaterials.cpp
diff options
context:
space:
mode:
authorBrad Linden <46733234+brad-linden@users.noreply.github.com>2024-06-12 14:33:01 -0700
committerGitHub <noreply@github.com>2024-06-12 14:33:01 -0700
commit071e464155a670a9a7e836ec52049fc80b507995 (patch)
treee129794d3f4c29c92d6515cbdbe6898ee8aa558b /indra/newview/lllocalgltfmaterials.cpp
parentf0de2ba6340e0d540aa70ac0086defde52cf60af (diff)
parent8444cd9562a6a7b755fcb075864e205122354192 (diff)
Merge pull request #1723 from secondlife/brad/maint-a-merge-to-gltf-dev
maint a merge to gltf dev
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())