summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llprimitive/lldaeloader.cpp1
-rw-r--r--indra/llprimitive/llmodel.h2
-rw-r--r--indra/newview/llfloatermodelpreview.cpp2
-rw-r--r--indra/newview/llfloatermodelpreview.h4
-rw-r--r--indra/newview/llmodelpreview.cpp8
5 files changed, 10 insertions, 7 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index d3acd44f06..17e9e05edd 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -289,6 +289,7 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
material = std::string(tri->getMaterial());
}
+ // Todo: mark model in some way as having generated(split) faces
materials.push_back(material);
face_list.push_back(face);
face_list.rbegin()->fillFromLegacyData(verts, indices);
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 51fa2f8079..96368d64e5 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -281,6 +281,8 @@ public:
EModelStatus mStatus ;
+ // A model/object can only have 8 faces, spillover faces will
+ // be moved to new model/object and assigned a submodel id.
int mSubmodelID;
};
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 3f2fcb148c..e5d451e909 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -136,7 +136,7 @@ mAvatarTabIndex(0)
mStatusLock = new LLMutex();
mModelPreview = NULL;
- mLODMode[LLModel::LOD_HIGH] = 0;
+ mLODMode[LLModel::LOD_HIGH] = LLModelPreview::LOD_FROM_FILE;
for (U32 i = 0; i < LLModel::LOD_HIGH; i++)
{
mLODMode[i] = LLModelPreview::MESH_OPTIMIZER;
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 8a01b0c307..51f9b3a0e2 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -196,9 +196,7 @@ protected:
std::map<std::string, bool> mViewOptionDisabled;
//store which lod mode each LOD is using
- // 0 - load from file
- // 1 - auto generate
- // 2 - use LoD above
+ // See eLoDMode
S32 mLODMode[4];
LLMutex* mStatusLock;
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index 96eb9340f5..11a536473c 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -1842,6 +1842,8 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
S32 model_meshopt_mode = meshopt_mode;
+ // Ideally this should run not per model,
+ // but combine all submodels with origin model as well
if (model_meshopt_mode == MESH_OPTIMIZER_COMBINE)
{
// Figure out buffer size
@@ -2758,7 +2760,7 @@ void LLModelPreview::updateLodControls(S32 lod)
S32 lod_mode = lod_combo->getCurrentIndex();
if (lod_mode == LOD_FROM_FILE) // LoD from file
{
- fmp->mLODMode[lod] = 0;
+ fmp->mLODMode[lod] = LOD_FROM_FILE;
for (U32 i = 0; i < num_file_controls; ++i)
{
mFMP->childSetVisible(file_controls[i] + lod_name[lod], true);
@@ -2771,7 +2773,7 @@ void LLModelPreview::updateLodControls(S32 lod)
}
else if (lod_mode == USE_LOD_ABOVE) // use LoD above
{
- fmp->mLODMode[lod] = 2;
+ fmp->mLODMode[lod] = USE_LOD_ABOVE;
for (U32 i = 0; i < num_file_controls; ++i)
{
mFMP->childSetVisible(file_controls[i] + lod_name[lod], false);
@@ -2797,7 +2799,7 @@ void LLModelPreview::updateLodControls(S32 lod)
}
else // auto generate, the default case for all LoDs except High
{
- fmp->mLODMode[lod] = 1;
+ fmp->mLODMode[lod] = MESH_OPTIMIZER;
//don't actually regenerate lod when refreshing UI
mLODFrozen = true;