mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 02:09:02 +08:00
Fix clang warnings in the painting gizmos.
This commit is contained in:
parent
6d53b34efc
commit
d23e114aed
@ -459,7 +459,7 @@ void GLGizmoFdmSupports::update_model_object() const
|
|||||||
if (! mv->is_model_part())
|
if (! mv->is_model_part())
|
||||||
continue;
|
continue;
|
||||||
++idx;
|
++idx;
|
||||||
updated |= mv->supported_facets.set(*m_triangle_selectors[idx].get());
|
updated |= mv->supported_facets.set(*m_triangle_selectors[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updated) {
|
if (updated) {
|
||||||
|
@ -509,7 +509,7 @@ void GLGizmoMmuSegmentation::update_model_object() const
|
|||||||
if (! mv->is_model_part())
|
if (! mv->is_model_part())
|
||||||
continue;
|
continue;
|
||||||
++idx;
|
++idx;
|
||||||
updated |= mv->mm_segmentation_facets.set(*m_triangle_selectors[idx].get());
|
updated |= mv->mm_segmentation_facets.set(*m_triangle_selectors[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updated) {
|
if (updated) {
|
||||||
@ -699,7 +699,7 @@ void GLMmSegmentationGizmo3DScene::render(size_t triangle_indices_idx) const
|
|||||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, this->vertices_VBO_id));
|
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, this->vertices_VBO_id));
|
||||||
const GLint position_id = shader->get_attrib_location("v_position");
|
const GLint position_id = shader->get_attrib_location("v_position");
|
||||||
if (position_id != -1) {
|
if (position_id != -1) {
|
||||||
glsafe(::glVertexAttribPointer(position_id, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (GLvoid*)0));
|
glsafe(::glVertexAttribPointer(position_id, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), (GLvoid*)nullptr));
|
||||||
glsafe(::glEnableVertexAttribArray(position_id));
|
glsafe(::glEnableVertexAttribArray(position_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public:
|
|||||||
// will be also extended to support additional states, requiring at least one state to remain free out of 19 states.
|
// will be also extended to support additional states, requiring at least one state to remain free out of 19 states.
|
||||||
static const constexpr size_t EXTRUDERS_LIMIT = 16;
|
static const constexpr size_t EXTRUDERS_LIMIT = 16;
|
||||||
|
|
||||||
const float get_cursor_radius_min() const override { return CursorRadiusMin; }
|
float get_cursor_radius_min() const override { return CursorRadiusMin; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ColorRGBA get_cursor_sphere_left_button_color() const override;
|
ColorRGBA get_cursor_sphere_left_button_color() const override;
|
||||||
|
@ -97,9 +97,9 @@ public:
|
|||||||
// after all volumes (including transparent ones) are rendered.
|
// after all volumes (including transparent ones) are rendered.
|
||||||
virtual void render_painter_gizmo() = 0;
|
virtual void render_painter_gizmo() = 0;
|
||||||
|
|
||||||
virtual const float get_cursor_radius_min() const { return CursorRadiusMin; }
|
virtual float get_cursor_radius_min() const { return CursorRadiusMin; }
|
||||||
virtual const float get_cursor_radius_max() const { return CursorRadiusMax; }
|
virtual float get_cursor_radius_max() const { return CursorRadiusMax; }
|
||||||
virtual const float get_cursor_radius_step() const { return CursorRadiusStep; }
|
virtual float get_cursor_radius_step() const { return CursorRadiusStep; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implement when want to process mouse events in gizmo
|
/// Implement when want to process mouse events in gizmo
|
||||||
@ -192,7 +192,6 @@ private:
|
|||||||
|
|
||||||
static std::shared_ptr<GLModel> s_sphere;
|
static std::shared_ptr<GLModel> s_sphere;
|
||||||
|
|
||||||
bool m_internal_stack_active = false;
|
|
||||||
bool m_schedule_update = false;
|
bool m_schedule_update = false;
|
||||||
Vec2d m_last_mouse_click = Vec2d::Zero();
|
Vec2d m_last_mouse_click = Vec2d::Zero();
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ void GLGizmoSeam::update_model_object() const
|
|||||||
if (! mv->is_model_part())
|
if (! mv->is_model_part())
|
||||||
continue;
|
continue;
|
||||||
++idx;
|
++idx;
|
||||||
updated |= mv->seam_facets.set(*m_triangle_selectors[idx].get());
|
updated |= mv->seam_facets.set(*m_triangle_selectors[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updated) {
|
if (updated) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user