Fixed differences after rebase to master

This commit is contained in:
enricoturri1966 2022-12-02 12:39:49 +01:00
parent 456e61c7d3
commit 210273e12f

View File

@ -866,15 +866,12 @@ void GLGizmoMeasure::on_render()
} }
case Measure::SurfaceFeatureType::Plane: case Measure::SurfaceFeatureType::Plane:
{ {
// no need to render the plane in case it is rendered with the same color as the volume in the 3D scene const auto& [idx, normal, pt] = feature.get_plane();
if (colors.front() != m_parent.get_selection().get_first_volume()->render_color) { assert(idx < m_plane_models_cache.size());
const auto& [idx, normal, pt] = feature.get_plane(); set_matrix_uniforms(Transform3d::Identity());
assert(idx < m_plane_models_cache.size()); set_emission_uniform(colors.front(), hover);
set_matrix_uniforms(Transform3d::Identity()); m_plane_models_cache[idx].set_color(colors.front());
set_emission_uniform(colors.front(), hover); m_plane_models_cache[idx].render();
m_plane_models_cache[idx].set_color(colors.front());
m_plane_models_cache[idx].render();
}
if (update_raycasters_transform) { if (update_raycasters_transform) {
auto it = m_raycasters.find(PLANE_ID); auto it = m_raycasters.find(PLANE_ID);
if (it != m_raycasters.end() && it->second != nullptr) if (it != m_raycasters.end() && it->second != nullptr)