summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llgltfloader.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 16:35:49 +0300
committerGitHub <noreply@github.com>2024-05-15 16:35:49 +0300
commite49dcb8d0c9f539997effb640e350d9d0689aae6 (patch)
tree1bf99eaccce6de17c62f13c6595f7f497548dc5c /indra/llprimitive/llgltfloader.cpp
parent531cd34f670170ade57f8813fe48012b61a1d3c2 (diff)
parent5f8a7374b9f18e0112d6749a9c845bd077a81acb (diff)
Merge pull request #1476 from secondlife/marchcat/x-b-merge
Maint X -> Maint B merge
Diffstat (limited to 'indra/llprimitive/llgltfloader.cpp')
-rw-r--r--indra/llprimitive/llgltfloader.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/indra/llprimitive/llgltfloader.cpp b/indra/llprimitive/llgltfloader.cpp
index 8e498158d6..810b648f17 100644
--- a/indra/llprimitive/llgltfloader.cpp
+++ b/indra/llprimitive/llgltfloader.cpp
@@ -59,11 +59,11 @@
static const std::string lod_suffix[LLModel::NUM_LODS] =
{
- "_LOD0",
- "_LOD1",
- "_LOD2",
- "",
- "_PHYS",
+ "_LOD0",
+ "_LOD1",
+ "_LOD2",
+ "",
+ "_PHYS",
};
@@ -142,13 +142,13 @@ bool LLGLTFLoader::parseMeshes()
// 2022-04 DJH Volume params from dae example. TODO understand PCODE
LLVolumeParams volume_params;
- volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
-
+ volume_params.setType(LL_PCODE_PROFILE_SQUARE, LL_PCODE_PATH_LINE);
+
for (tinygltf::Mesh mesh : mGltfModel.meshes)
{
LLModel *pModel = new LLModel(volume_params, 0.f);
- if (populateModelFromMesh(pModel, mesh) &&
+ if (populateModelFromMesh(pModel, mesh) &&
(LLModel::NO_ERRORS == pModel->getStatus()) &&
validate_model(pModel))
{
@@ -179,7 +179,7 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const tinygltf::Mesh &
if (pos_idx >= 0)
{
positions_a = mGltfModel.accessors[pos_idx];
- if (TINYGLTF_COMPONENT_TYPE_FLOAT != positions_a.componentType)
+ if (TINYGLTF_COMPONENT_TYPE_FLOAT != positions_a.componentType)
continue;
auto positions_bv = mGltfModel.bufferViews[positions_a.bufferView];
auto positions_buf = mGltfModel.buffers[positions_bv.buffer];
@@ -202,12 +202,12 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const tinygltf::Mesh &
//auto pos = mesh. TODO resume here DJH 2022-04
}
}
-
+
//pModel->addFace()
return false;
}
-bool LLGLTFLoader::parseMaterials()
+bool LLGLTFLoader::parseMaterials()
{
if (!mGltfLoaded) return false;
@@ -241,7 +241,7 @@ bool LLGLTFLoader::parseMaterials()
LL_WARNS("GLTF_IMPORT") << "Unsupported image encoding" << LL_ENDL;
return false;
}
-
+
if (image.size != image.height * image.width * image.numChannels * image.bytesPerChannel)
{
LL_WARNS("GLTF_IMPORT") << "Image size error" << LL_ENDL;
@@ -329,7 +329,7 @@ bool LLGLTFLoader::parseMaterials()
mMaterials.push_back(mat);
}
- return true;
+ return true;
}
// TODO: convert raw vertex buffers to UUIDs
@@ -346,7 +346,7 @@ void LLGLTFLoader::uploadMaterials()
if (mat.hasBaseTex)
{
gltf_texture& gtex = mTextures[mat.baseColorTexIdx];
- if (gtex.imageUuid.isNull())
+ if (gtex.imageUuid.isNull())
{
gtex.imageUuid = imageBufferToTextureUUID(gtex);
}