Tech ENABLE_GLBEGIN_GLEND_REMOVAL - SLA caps rendered using GLModel

(cherry picked from commit prusa3d/PrusaSlicer@c9ff260d13)
This commit is contained in:
enricoturri1966 2023-10-23 11:35:43 +08:00 committed by Noisyfox
parent 10243b3a8c
commit dde64acf72
2 changed files with 64 additions and 49 deletions

View file

@ -355,12 +355,12 @@ class GLCanvas3D
{
struct Triangles
{
Pointf3s object;
Pointf3s supports;
GLModel object;
GLModel supports;
};
typedef std::map<unsigned int, Triangles> ObjectIdToTrianglesMap;
typedef std::map<unsigned int, Triangles> ObjectIdToModelsMap;
double z;
ObjectIdToTrianglesMap triangles;
ObjectIdToModelsMap triangles;
SlaCap() { reset(); }
void reset() { z = DBL_MAX; triangles.clear(); }
@ -526,7 +526,7 @@ private:
std::array<ClippingPlane, 2> m_clipping_planes;
ClippingPlane m_camera_clipping_plane;
bool m_use_clipping_planes;
SlaCap m_sla_caps[2];
std::array<SlaCap, 2> m_sla_caps;
std::string m_sidebar_field;
// when true renders an extra frame by not resetting m_dirty to false
// see request_extra_frame()