mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-13 12:07:41 +00:00
Use a 2-pass depth based outline algorithm when selected
This commit is contained in:
@@ -39,6 +39,10 @@ extern Slic3r::ColorRGBA adjust_color_for_rendering(const Slic3r::C
|
||||
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
class Size;
|
||||
}
|
||||
|
||||
class SLAPrintObject;
|
||||
enum SLAPrintObjectStep : unsigned int;
|
||||
class BuildVolume;
|
||||
@@ -322,7 +326,7 @@ public:
|
||||
virtual void render();
|
||||
|
||||
//BBS: add outline related logic and add virtual specifier
|
||||
virtual void render_with_outline(const Transform3d &view_model_matrix);
|
||||
virtual void render_with_outline(const GUI::Size& cnv_size);
|
||||
|
||||
//BBS: add simple render function for thumbnail
|
||||
void simple_render(GLShaderProgram* shader, ModelObjectPtrs& model_objects, std::vector<ColorRGBA>& extruder_colors, bool ban_light =false);
|
||||
@@ -355,7 +359,7 @@ class GLWipeTowerVolume : public GLVolume {
|
||||
public:
|
||||
GLWipeTowerVolume(const std::vector<ColorRGBA>& colors);
|
||||
void render() override;
|
||||
void render_with_outline(const Transform3d &view_model_matrix) override { render(); }
|
||||
void render_with_outline(const GUI::Size& cnv_size) override { render(); }
|
||||
|
||||
std::vector<GUI::GLModel> model_per_colors;
|
||||
bool IsTransparent();
|
||||
@@ -465,8 +469,8 @@ public:
|
||||
int get_selection_support_threshold_angle(bool&) const;
|
||||
// Render the volumes by OpenGL.
|
||||
//BBS: add outline drawing logic
|
||||
void render(ERenderType type, bool disable_cullface, const Transform3d& view_matrix, const Transform3d& projection_matrix,
|
||||
std::function<bool(const GLVolume &)> filter_func = std::function<bool(const GLVolume &)>(), bool with_outline = true) const;
|
||||
void render(ERenderType type, bool disable_cullface, const Transform3d& view_matrix, const Transform3d& projection_matrix, const GUI::Size& cnv_size,
|
||||
std::function<bool(const GLVolume &)> filter_func = std::function<bool(const GLVolume &)>()) const;
|
||||
|
||||
// Clear the geometry
|
||||
void clear() { for (auto *v : volumes) delete v; volumes.clear(); }
|
||||
|
||||
Reference in New Issue
Block a user