summaryrefslogtreecommitdiff
path: root/indra/newview/llmodelpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmodelpreview.cpp')
-rw-r--r--indra/newview/llmodelpreview.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 82c5e696cc..7ecd7cdff9 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -1362,7 +1362,7 @@ F32 LLModelPreview::genMeshOptimizerPerModel(LLModel *base_model, LLModel *targe
S32 size_indices = 0;
S32 size_vertices = 0;
- for (U32 face_idx = 0; face_idx < base_model->getNumVolumeFaces(); ++face_idx)
+ for (S32 face_idx = 0; face_idx < base_model->getNumVolumeFaces(); ++face_idx)
{
const LLVolumeFace &face = base_model->getVolumeFace(face_idx);
size_indices += face.mNumIndices;
@@ -1388,7 +1388,7 @@ F32 LLModelPreview::genMeshOptimizerPerModel(LLModel *base_model, LLModel *targe
S32 combined_positions_shift = 0;
S32 indices_idx_shift = 0;
S32 combined_indices_shift = 0;
- for (U32 face_idx = 0; face_idx < base_model->getNumVolumeFaces(); ++face_idx)
+ for (S32 face_idx = 0; face_idx < base_model->getNumVolumeFaces(); ++face_idx)
{
const LLVolumeFace &face = base_model->getVolumeFace(face_idx);
@@ -1513,7 +1513,7 @@ F32 LLModelPreview::genMeshOptimizerPerModel(LLModel *base_model, LLModel *targe
S32 valid_faces = 0;
// Crude method to copy indices back into face
- for (U32 face_idx = 0; face_idx < base_model->getNumVolumeFaces(); ++face_idx)
+ for (S32 face_idx = 0; face_idx < base_model->getNumVolumeFaces(); ++face_idx)
{
const LLVolumeFace &face = base_model->getVolumeFace(face_idx);
@@ -1531,7 +1531,7 @@ F32 LLModelPreview::genMeshOptimizerPerModel(LLModel *base_model, LLModel *targe
// Copy relevant indices and vertices
for (S32 i = 0; i < size_new_indices; ++i)
{
- U32 idx = output_indices[i];
+ S32 idx = (S32)output_indices[i];
if ((i % 3) == 0)
{
@@ -1560,7 +1560,7 @@ F32 LLModelPreview::genMeshOptimizerPerModel(LLModel *base_model, LLModel *targe
// U16 vertices overflow shouldn't happen, but just in case
size_new_indices = 0;
valid_faces = 0;
- for (U32 face_idx = 0; face_idx < base_model->getNumVolumeFaces(); ++face_idx)
+ for (S32 face_idx = 0; face_idx < base_model->getNumVolumeFaces(); ++face_idx)
{
genMeshOptimizerPerFace(base_model, target_model, face_idx, indices_decimator, error_threshold, simplification_mode);
const LLVolumeFace &face = target_model->getVolumeFace(face_idx);
@@ -1906,7 +1906,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
LLModel* target_model = mModel[lod][mdl_idx];
// carry over normalized transform into simplified model
- for (int i = 0; i < base->getNumVolumeFaces(); ++i)
+ for (S32 i = 0; i < base->getNumVolumeFaces(); ++i)
{
LLVolumeFace& src = base->getVolumeFace(i);
LLVolumeFace& dst = target_model->getVolumeFace(i);
@@ -1920,7 +1920,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
if (model_meshopt_mode == MESH_OPTIMIZER_PRECISE)
{
// Run meshoptimizer for each face
- for (U32 face_idx = 0; face_idx < base->getNumVolumeFaces(); ++face_idx)
+ for (S32 face_idx = 0; face_idx < base->getNumVolumeFaces(); ++face_idx)
{
F32 res = genMeshOptimizerPerFace(base, target_model, face_idx, indices_decimator, lod_error_threshold, MESH_OPTIMIZER_FULL);
if (res < 0)
@@ -1936,7 +1936,7 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
if (model_meshopt_mode == MESH_OPTIMIZER_SLOPPY)
{
// Run meshoptimizer for each face
- for (U32 face_idx = 0; face_idx < base->getNumVolumeFaces(); ++face_idx)
+ for (S32 face_idx = 0; face_idx < base->getNumVolumeFaces(); ++face_idx)
{
if (genMeshOptimizerPerFace(base, target_model, face_idx, indices_decimator, lod_error_threshold, MESH_OPTIMIZER_NO_TOPOLOGY) < 0)
{