diff options
author | enricoturri1966 <enricoturri@seznam.cz> | 2020-06-02 11:02:50 +0300 |
---|---|---|
committer | enricoturri1966 <enricoturri@seznam.cz> | 2020-06-02 11:02:50 +0300 |
commit | aa92cbf051b56c7174079d8d1cfc42c2440847ad (patch) | |
tree | aee0d7ce5c54e44f84217a491bb1ac311539f52d /src/slic3r/GUI/3DScene.hpp | |
parent | 21de9d23eceb0ba32acfe356a986b90eb32ed360 (diff) |
New tech ENABLE_SMOOTH_NORMALS (disabled) -> Added two experimental functions to smooth normals using libigl (none of them working properly in detecting edges) when calling GLIndexedVertexArray::load_mesh_full_shading()
Diffstat (limited to 'src/slic3r/GUI/3DScene.hpp')
-rw-r--r-- | src/slic3r/GUI/3DScene.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/slic3r/GUI/3DScene.hpp b/src/slic3r/GUI/3DScene.hpp index 1401e79fb..da111d7aa 100644 --- a/src/slic3r/GUI/3DScene.hpp +++ b/src/slic3r/GUI/3DScene.hpp @@ -125,8 +125,13 @@ public: unsigned int triangle_indices_VBO_id{ 0 }; unsigned int quad_indices_VBO_id{ 0 }; - void load_mesh_full_shading(const TriangleMesh &mesh); +#if ENABLE_SMOOTH_NORMALS + void load_mesh_full_shading(const TriangleMesh& mesh, bool smooth_normals = false); + void load_mesh(const TriangleMesh& mesh, bool smooth_normals = false) { this->load_mesh_full_shading(mesh, smooth_normals); } +#else + void load_mesh_full_shading(const TriangleMesh& mesh); void load_mesh(const TriangleMesh& mesh) { this->load_mesh_full_shading(mesh); } +#endif // ENABLE_SMOOTH_NORMALS inline bool has_VBOs() const { return vertices_and_normals_interleaved_VBO_id != 0; } |