diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2019-03-25 14:01:02 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2019-04-08 11:31:16 +0300 |
commit | 9b7857aaab416a18cf67d273e46308e21d3295a2 (patch) | |
tree | 00b9d82cecc2799cec8ab7b4eefb48c1ec04434e /src/slic3r/GUI/3DScene.hpp | |
parent | 273fcf68a134b0c7526663049fad2f5636b67488 (diff) |
SLA gizmo clipping plane logic moved to fragment shader
This means the clipping now works again with both legacy and modern OpenGL
Diffstat (limited to 'src/slic3r/GUI/3DScene.hpp')
-rw-r--r-- | src/slic3r/GUI/3DScene.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/slic3r/GUI/3DScene.hpp b/src/slic3r/GUI/3DScene.hpp index 5cc301a39..0ed8d2e6b 100644 --- a/src/slic3r/GUI/3DScene.hpp +++ b/src/slic3r/GUI/3DScene.hpp @@ -427,6 +427,9 @@ private: // z range for clipping in shaders float z_range[2]; + // plane coeffs for clipping in shaders + float clipping_plane[4]; + public: GLVolumePtrs volumes; @@ -485,6 +488,7 @@ public: } void set_z_range(float min_z, float max_z) { z_range[0] = min_z; z_range[1] = max_z; } + void set_clipping_plane(const double* coeffs) { clipping_plane[0] = coeffs[0]; clipping_plane[1] = coeffs[1]; clipping_plane[2] = coeffs[2]; clipping_plane[3] = coeffs[3]; } // returns true if all the volumes are completely contained in the print volume // returns the containment state in the given out_state, if non-null |