summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-11-15 23:23:09 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-11-15 23:23:09 +0200
commit3641541c6cc7f33f0e0dc2e1eb2cfdfcec23322b (patch)
tree9364983a8006240048bf5adba7dcd8aca8a3c4ab /indra/llprimitive
parent27c1f52e6e484c778448d026600bdbcad7d19fb9 (diff)
SL-15756 Removed mHasGeneratedFaces
mHasGeneratedFaces is always true for some types of models and glod was treating faces as one mesh by default, so meshoptimizer should do the same regardles of mHasGeneratedFaces
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/lldaeloader.cpp16
-rw-r--r--indra/llprimitive/llmodel.cpp3
-rw-r--r--indra/llprimitive/llmodel.h5
3 files changed, 3 insertions, 21 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 73a0b3d673..93d492b42d 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -153,7 +153,6 @@ LLModel::EModelStatus load_face_from_dom_triangles(
std::vector<LLVolumeFace>& face_list,
std::vector<std::string>& materials,
domTrianglesRef& tri,
- bool &generated_additional_faces,
LLSD& log_msg)
{
LLVolumeFace face;
@@ -293,8 +292,6 @@ LLModel::EModelStatus load_face_from_dom_triangles(
if (indices.size()%3 == 0 && verts.size() >= 65532)
{
- generated_additional_faces = true;
-
std::string material;
if (tri->getMaterial())
@@ -360,7 +357,6 @@ LLModel::EModelStatus load_face_from_dom_polylist(
std::vector<LLVolumeFace>& face_list,
std::vector<std::string>& materials,
domPolylistRef& poly,
- bool& generated_additional_faces,
LLSD& log_msg)
{
domPRef p = poly->getP();
@@ -574,8 +570,6 @@ LLModel::EModelStatus load_face_from_dom_polylist(
if (indices.size()%3 == 0 && indices.size() >= 65532)
{
- generated_additional_faces = true;
-
std::string material;
if (poly->getMaterial())
@@ -2453,13 +2447,11 @@ bool LLDAELoader::addVolumeFacesFromDomMesh(LLModel* pModel,domMesh* mesh, LLSD&
LLModel::EModelStatus status = LLModel::NO_ERRORS;
domTriangles_Array& tris = mesh->getTriangles_array();
- pModel->mHasGeneratedFaces = false;
-
for (U32 i = 0; i < tris.getCount(); ++i)
{
domTrianglesRef& tri = tris.get(i);
- status = load_face_from_dom_triangles(pModel->getVolumeFaces(), pModel->getMaterialList(), tri, pModel->mHasGeneratedFaces, log_msg);
+ status = load_face_from_dom_triangles(pModel->getVolumeFaces(), pModel->getMaterialList(), tri, log_msg);
pModel->mStatus = status;
if(status != LLModel::NO_ERRORS)
{
@@ -2472,7 +2464,7 @@ bool LLDAELoader::addVolumeFacesFromDomMesh(LLModel* pModel,domMesh* mesh, LLSD&
for (U32 i = 0; i < polys.getCount(); ++i)
{
domPolylistRef& poly = polys.get(i);
- status = load_face_from_dom_polylist(pModel->getVolumeFaces(), pModel->getMaterialList(), poly, pModel->mHasGeneratedFaces, log_msg);
+ status = load_face_from_dom_polylist(pModel->getVolumeFaces(), pModel->getMaterialList(), poly, log_msg);
if(status != LLModel::NO_ERRORS)
{
@@ -2487,9 +2479,6 @@ bool LLDAELoader::addVolumeFacesFromDomMesh(LLModel* pModel,domMesh* mesh, LLSD&
{
domPolygonsRef& poly = polygons.get(i);
- // Due to how poligons work, assume that face was 'generated' by default
- pModel->mHasGeneratedFaces = true;
-
status = load_face_from_dom_polygons(pModel->getVolumeFaces(), pModel->getMaterialList(), poly);
if(status != LLModel::NO_ERRORS)
@@ -2589,7 +2578,6 @@ bool LLDAELoader::loadModelsFromDomMesh(domMesh* mesh, std::vector<LLModel*>& mo
{
LLModel* next = new LLModel(volume_params, 0.f);
next->mSubmodelID = ++submodelID;
- next->mHasGeneratedFaces = ret->mHasGeneratedFaces;
next->mLabel = model_name + (char)((int)'a' + next->mSubmodelID) + lod_suffix[mLod];
next->getVolumeFaces() = remainder;
next->mNormalizedScale = ret->mNormalizedScale;
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index 8b8fde0ea0..702a1b5238 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -55,8 +55,7 @@ LLModel::LLModel(LLVolumeParams& params, F32 detail)
mNormalizedTranslation(0,0,0),
mPelvisOffset( 0.0f ),
mStatus(NO_ERRORS),
- mSubmodelID(0),
- mHasGeneratedFaces(false)
+ mSubmodelID(0)
{
mDecompID = -1;
mLocalID = -1;
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 87a47dcb36..96368d64e5 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -284,11 +284,6 @@ public:
// A model/object can only have 8 faces, spillover faces will
// be moved to new model/object and assigned a submodel id.
int mSubmodelID;
- // A .dae face can have more than 65K vertices, but viewer
- // is limited to U16 for indices, in such case spilower will
- // be moved into new face and this will be set to true.
- // Also true in case faces were generated from polygons
- bool mHasGeneratedFaces;
};
typedef std::vector<LLPointer<LLModel> > model_list;