diff --git a/.gitignore b/.gitignore index 9006f7151..66ba1395b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,15 +14,16 @@ build-*/ *.filters *.db *.opendb -*.lib -*.exe moc_*.cpp ui_*.h qrc_*.cpp Debug/ Release/ +src/external/lib/win32-msvc2013/*.lib +src/external/lib/win32-msvc2015/*.lib src/distrib/plugins/*.lib src/distrib/plugins/*.dll src/distrib/plugins/*.xml src/distrib/common.lib src/distrib/meshlab.exe +src/distrib/meshlabserver.exe diff --git a/src/common/ml_shared_data_context.cpp b/src/common/ml_shared_data_context.cpp index b2b00ff4e..4d6ebbb1b 100644 --- a/src/common/ml_shared_data_context.cpp +++ b/src/common/ml_shared_data_context.cpp @@ -609,7 +609,7 @@ void MLPoliciesStandAloneFunctions::updatedRendAttsAccordingToPriorities(const M result = tmp; } -void MLPoliciesStandAloneFunctions::suggestedDefaultPerViewRenderingData(MeshModel* meshmodel,MLRenderingData& dtout) +void MLPoliciesStandAloneFunctions::suggestedDefaultPerViewRenderingData(MeshModel* meshmodel,MLRenderingData& dtout, size_t minpolnumpersmoothshading) { MLRenderingData dt; if (meshmodel == NULL) @@ -633,7 +633,8 @@ void MLPoliciesStandAloneFunctions::suggestedDefaultPerViewRenderingData(MeshMod dt.set(MLRenderingData::PR_POINTS,false); tmpatts.reset(); tmpatts[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION] = true; - tmpatts[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL] = true; + tmpatts[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL] = (meshmodel->cm.FN() > minpolnumpersmoothshading); + tmpatts[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] = !(tmpatts[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL]); tmpatts[MLRenderingData::ATT_NAMES::ATT_VERTCOLOR] = true; if (meshmodel != NULL) tmpatts[MLRenderingData::ATT_NAMES::ATT_FACECOLOR] = (meshmodel->hasDataMask(MeshModel::MM_FACECOLOR) && !meshmodel->hasDataMask(MeshModel::MM_VERTCOLOR)); diff --git a/src/common/ml_shared_data_context.h b/src/common/ml_shared_data_context.h index 0825dff60..bf27adaac 100644 --- a/src/common/ml_shared_data_context.h +++ b/src/common/ml_shared_data_context.h @@ -224,7 +224,7 @@ struct MLPoliciesStandAloneFunctions static void suggestedDefaultPerViewGLOptions(MLPerViewGLOptions& tmp); - static void suggestedDefaultPerViewRenderingData(MeshModel* meshmodel, MLRenderingData& dt); + static void suggestedDefaultPerViewRenderingData(MeshModel* meshmodel, MLRenderingData& dt,size_t minpolnumpersmoothshading = 0); static void disableRedundatRenderingDataAccordingToPriorities(MLRenderingData& dt); diff --git a/src/meshlab/mainwindow.h b/src/meshlab/mainwindow.h index 914aa4980..f35aa8da0 100644 --- a/src/meshlab/mainwindow.h +++ b/src/meshlab/mainwindow.h @@ -81,6 +81,9 @@ public: size_t perbatchprimitives; inline static QString perBatchPrimitives() {return "MeshLab::System::perBatchPrimitives";} + size_t minpolygonpersmoothrendering; + inline static QString minPolygonNumberPerSmoothRendering() { return "MeshLab::System::minPolygonNumberPerSmoothRendering"; } + std::ptrdiff_t maxTextureMemory; inline static QString maxTextureMemoryParam() {return "MeshLab::System::maxTextureMemory";} };