diff --git a/snapcraft.yaml b/snapcraft.yaml index 95d4da7d5..ced5a0837 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -29,10 +29,9 @@ apps: parts: meshlab: - plugin: [qmake, cmake] + plugin: qmake qt-version: qt5 source: https://github.com/cnr-isti-vclab/meshlab.git - build-snaps: [cmake] build-packages: - cmake - qt5-default diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cb359792c..22d8ad439 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,7 +2,7 @@ # Copyright 2019, 2021, Visual Computing Lab, ISTI - Italian National Research Council # SPDX-License-Identifier: BSL-1.0 -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.10) project(MeshLab) ### Build options diff --git a/src/common/GLExtensionsManager.cpp b/src/common/GLExtensionsManager.cpp index 985260d56..e9aa7134e 100644 --- a/src/common/GLExtensionsManager.cpp +++ b/src/common/GLExtensionsManager.cpp @@ -61,7 +61,7 @@ void GLExtensionsManager::initializeGLextensions() if (!glewInitialized) { glewExperimental = GL_TRUE; GLenum err = glewInit(); - if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY) { + if (err != GLEW_OK) { throw MLException(QString("GLEW initialization failed: %1\n") .arg((const char *)glewGetErrorString(err))); } diff --git a/src/common/ml_shared_data_context/ml_shared_data_context.cpp b/src/common/ml_shared_data_context/ml_shared_data_context.cpp index 23899066f..081c90a89 100644 --- a/src/common/ml_shared_data_context/ml_shared_data_context.cpp +++ b/src/common/ml_shared_data_context/ml_shared_data_context.cpp @@ -134,11 +134,15 @@ void MLPoliciesStandAloneFunctions::maskMeaninglessAttributesPerPrimitiveModalit } } -void MLPoliciesStandAloneFunctions::updatedRendAttsAccordingToPriorities(const MLRenderingData::PRIMITIVE_MODALITY pm,const MLRenderingData::RendAtts& updated,const MLRenderingData::RendAtts& current,MLRenderingData::RendAtts& result) +void MLPoliciesStandAloneFunctions::updatedRendAttsAccordingToPriorities( + const MLRenderingData::PRIMITIVE_MODALITY pm, + const MLRenderingData::RendAtts& updated, //from the result of the filter + const MLRenderingData::RendAtts& current, //from the current model + MLRenderingData::RendAtts& result) //returned final result { - MLRenderingData::RendAtts filteredupdated = updated; - MLRenderingData::RendAtts tmp = current; - tmp[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION]; + MLRenderingData::RendAtts filteredupdated = updated; + MLRenderingData::RendAtts tmp = current; // tmp will be then saved in returned + tmp[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION]; if ((pm == MLRenderingData::PR_WIREFRAME_TRIANGLES) || (pm == MLRenderingData::PR_WIREFRAME_EDGES)) { tmp[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL] = false; @@ -146,15 +150,18 @@ void MLPoliciesStandAloneFunctions::updatedRendAttsAccordingToPriorities(const M } else { + //vert normal shading if in current or in updated tmp[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL]; - tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] = (tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_FACENORMAL]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL]); +// tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] = (tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_FACENORMAL]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL]); + //face normal shading if in current and in updated + tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] = (tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] && filteredupdated[MLRenderingData::ATT_NAMES::ATT_FACENORMAL]); } - + tmp[MLRenderingData::ATT_NAMES::ATT_VERTCOLOR] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTCOLOR]; tmp[MLRenderingData::ATT_NAMES::ATT_FACECOLOR] = (tmp[MLRenderingData::ATT_NAMES::ATT_FACECOLOR] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_FACECOLOR]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTCOLOR]); - tmp[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE]; - tmp[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE] = (tmp[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE]); - result = tmp; + tmp[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE]; + tmp[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE] = (tmp[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE]); + result = tmp; } void MLPoliciesStandAloneFunctions::suggestedDefaultPerViewRenderingData(MeshModel* meshmodel,MLRenderingData& dtout, size_t minpolnumpersmoothshading) diff --git a/src/meshlabplugins/filter_camera/filter_camera.cpp b/src/meshlabplugins/filter_camera/filter_camera.cpp index b7cad21af..3a4204a12 100644 --- a/src/meshlabplugins/filter_camera/filter_camera.cpp +++ b/src/meshlabplugins/filter_camera/filter_camera.cpp @@ -74,13 +74,13 @@ QString FilterCameraPlugin::filterName(ActionIDType filterId) const QString FilterCameraPlugin::filterInfo(ActionIDType filterId) const { switch(filterId) { - case FP_SET_MESH_CAMERA : return QString("This filter allows one to set a shot for the current mesh"); - case FP_SET_RASTER_CAMERA : return QString("This filter allows one to set a shot for the current mesh"); - case FP_QUALITY_FROM_CAMERA : return QString("Compute vertex quality using the camera definition, according to viewing angle or distance"); - case FP_CAMERA_ROTATE : return QString("Rotate the camera, or all the cameras of the project. The selected raster is the reference if viewpoint rotation is selected."); - case FP_CAMERA_SCALE : return QString("Scale the camera, or all the cameras of the project. The selected raster is the reference if viewpoint scaling is selected."); - case FP_CAMERA_TRANSLATE : return QString("Translate the camera, or all the cameras of the project."); - case FP_CAMERA_TRANSFORM : return QString("Transform the camera extrinsics, or all the cameras of the project."); + case FP_SET_MESH_CAMERA : return QString("This filter allows one to set a shot for the current mesh"); + case FP_SET_RASTER_CAMERA : return QString("This filter allows one to set a shot for the current mesh"); + case FP_QUALITY_FROM_CAMERA : return QString("Compute vertex quality using the camera definition, according to viewing angle or distance"); + case FP_CAMERA_ROTATE : return QString("Rotate the camera, or all the cameras of the project. The selected raster is the reference if viewpoint rotation is selected."); + case FP_CAMERA_SCALE : return QString("Scale the camera, or all the cameras of the project. The selected raster is the reference if viewpoint scaling is selected."); + case FP_CAMERA_TRANSLATE : return QString("Translate the camera, or all the cameras of the project."); + case FP_CAMERA_TRANSFORM : return QString("Transform the camera extrinsics, or all the cameras of the project."); case FP_ORIENT_NORMALS_WITH_CAMERAS:return QString("Reorient vertex normals using cameras. For this filter to work the mesh needs to have the attribute 'correspondences' which is only created when loading Bundler files (.out projects)"); default : assert(0); } diff --git a/src/vcglib b/src/vcglib index c150c3f6b..5c0ea8b20 160000 --- a/src/vcglib +++ b/src/vcglib @@ -1 +1 @@ -Subproject commit c150c3f6b66edbb21e96d02d373af264b44afdc2 +Subproject commit 5c0ea8b20ea95adfc3a443ef60e02ee54057ec41