Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenricoturri1966 <enricoturri@seznam.cz>2021-01-12 11:03:35 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2021-04-12 15:09:08 +0300
commitf9cfbd857b7edd6a81a33c95ab6bc392d77d37eb (patch)
treee4adf2076be557d95ecac30e0302acae8f262da7 /src/slic3r/GUI/GCodeViewer.hpp
parent9d958768c82fbfb5aefa68bf00ef3800aab56092 (diff)
1st installment of tech ENABLE_SPLITTED_VERTEX_BUFFER - split vertex buffer when greater than a fixed max size
Diffstat (limited to 'src/slic3r/GUI/GCodeViewer.hpp')
-rw-r--r--src/slic3r/GUI/GCodeViewer.hpp182
1 files changed, 158 insertions, 24 deletions
diff --git a/src/slic3r/GUI/GCodeViewer.hpp b/src/slic3r/GUI/GCodeViewer.hpp
index 5f276b09f..51fd560a3 100644
--- a/src/slic3r/GUI/GCodeViewer.hpp
+++ b/src/slic3r/GUI/GCodeViewer.hpp
@@ -21,6 +21,11 @@ class GCodeViewer
{
using Color = std::array<float, 3>;
using VertexBuffer = std::vector<float>;
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ using MultiVertexBuffer = std::vector<VertexBuffer>;
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
using IndexBuffer = std::vector<unsigned int>;
using MultiIndexBuffer = std::vector<IndexBuffer>;
@@ -40,7 +45,7 @@ class GCodeViewer
CustomGCodes
};
- // vbo buffer containing vertices data used to rendder a specific toolpath type
+ // vbo buffer containing vertices data used to render a specific toolpath type
struct VBuffer
{
enum class EFormat : unsigned char
@@ -54,8 +59,17 @@ class GCodeViewer
};
EFormat format{ EFormat::Position };
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ // vbos id
+ std::vector<unsigned int> ids;
+#else
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// vbo id
unsigned int id{ 0 };
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// count of vertices, updated after data are sent to gpu
size_t count{ 0 };
@@ -66,26 +80,24 @@ class GCodeViewer
size_t position_offset_floats() const { return 0; }
size_t position_offset_size() const { return position_offset_floats() * sizeof(float); }
- size_t position_size_floats() const
- {
+ size_t position_size_floats() const {
switch (format)
{
case EFormat::Position:
case EFormat::PositionNormal3: { return 3; }
case EFormat::PositionNormal1: { return 4; }
- default: { return 0; }
+ default: { return 0; }
}
}
size_t position_size_bytes() const { return position_size_floats() * sizeof(float); }
- size_t normal_offset_floats() const
- {
+ size_t normal_offset_floats() const {
switch (format)
{
case EFormat::Position:
case EFormat::PositionNormal1: { return 0; }
case EFormat::PositionNormal3: { return 3; }
- default: { return 0; }
+ default: { return 0; }
}
}
size_t normal_offset_size() const { return normal_offset_floats() * sizeof(float); }
@@ -103,11 +115,22 @@ class GCodeViewer
void reset();
};
- // ibo buffer containing indices data (lines/triangles) used to render a specific toolpath type
+ // ibo buffer containing indices data (for lines/triangles) used to render a specific toolpath type
struct IBuffer
{
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ // id of the associated vertex buffer
+ unsigned int vbo{ 0 };
+ // ibo id
+ unsigned int ibo{ 0 };
+#else
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// ibo id
unsigned int id{ 0 };
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// count of indices, updated after data are sent to gpu
size_t count{ 0 };
@@ -128,10 +151,30 @@ class GCodeViewer
Vec3f position{ Vec3f::Zero() };
};
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ struct Sub_Path
+ {
+ Endpoint first;
+ Endpoint last;
+
+ bool contains(size_t s_id) const {
+ return first.s_id <= s_id && s_id <= last.s_id;
+ }
+ };
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
EMoveType type{ EMoveType::Noop };
ExtrusionRole role{ erNone };
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if !ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Endpoint first;
Endpoint last;
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#endif // !ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
float delta_extruder{ 0.0f };
float height{ 0.0f };
float width{ 0.0f };
@@ -140,13 +183,46 @@ class GCodeViewer
float volumetric_rate{ 0.0f };
unsigned char extruder_id{ 0 };
unsigned char cp_color_id{ 0 };
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ std::vector<Sub_Path> sub_paths;
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
bool matches(const GCodeProcessor::MoveVertex& move) const;
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ size_t vertices_count() const {
+ return sub_paths.empty() ? 0 : sub_paths.back().last.s_id - sub_paths.front().first.s_id + 1;
+ }
+ bool contains(size_t s_id) const {
+ return sub_paths.empty() ? false : sub_paths.front().first.s_id <= s_id && s_id <= sub_paths.back().last.s_id;
+ }
+ int get_id_of_sub_path_containing(size_t s_id) const {
+ if (sub_paths.empty())
+ return -1;
+ else {
+ for (int i = 0; i < static_cast<int>(sub_paths.size()); ++i) {
+ if (sub_paths[i].contains(s_id))
+ return i;
+ }
+ return -1;
+ }
+ }
+ void add_sub_path(const GCodeProcessor::MoveVertex& move, unsigned int b_id, size_t i_id, size_t s_id) {
+ Endpoint endpoint = { b_id, i_id, s_id, move.position };
+ sub_paths.push_back({ endpoint , endpoint });
+ }
+#else
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
size_t vertices_count() const { return last.s_id - first.s_id + 1; }
bool contains(size_t id) const { return first.s_id <= id && id <= last.s_id; }
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
};
- // Used to batch the indices needed to render paths
+ // Used to batch the indices needed to render the paths
struct RenderPath
{
// Render path property
@@ -202,28 +278,54 @@ class GCodeViewer
bool visible{ false };
void reset();
+
// b_id index of buffer contained in this->indices
// i_id index of first index contained in this->indices[b_id]
// s_id index of first vertex contained in this->vertices
void add_path(const GCodeProcessor::MoveVertex& move, unsigned int b_id, size_t i_id, size_t s_id);
- unsigned int indices_per_segment() const {
+
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ unsigned int max_vertices_per_segment() const {
switch (render_primitive_type)
{
case ERenderPrimitiveType::Point: { return 1; }
case ERenderPrimitiveType::Line: { return 2; }
- case ERenderPrimitiveType::Triangle: { return 42; } // 3 indices x 14 triangles
+ case ERenderPrimitiveType::Triangle: { return 8; }
default: { return 0; }
}
}
- unsigned int start_segment_vertex_offset() const {
+
+ size_t max_vertices_per_segment_size_floats() const { return vertices.vertex_size_floats() * static_cast<size_t>(max_vertices_per_segment()); }
+ size_t max_vertices_per_segment_size_bytes() const { return max_vertices_per_segment_size_floats() * sizeof(float); }
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ unsigned int indices_per_segment() const {
switch (render_primitive_type)
{
- case ERenderPrimitiveType::Point:
- case ERenderPrimitiveType::Line:
- case ERenderPrimitiveType::Triangle:
- default: { return 0; }
+ case ERenderPrimitiveType::Point: { return 1; }
+ case ERenderPrimitiveType::Line: { return 2; }
+ case ERenderPrimitiveType::Triangle: { return 42; } // 3 indices x 14 triangles
+ default: { return 0; }
}
}
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ size_t indices_per_segment_size_bytes() const { return static_cast<size_t>(indices_per_segment() * sizeof(unsigned int)); }
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ unsigned int start_segment_vertex_offset() const {
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ return 0;
+// switch (render_primitive_type)
+// {
+// case ERenderPrimitiveType::Point:
+// case ERenderPrimitiveType::Line:
+// case ERenderPrimitiveType::Triangle:
+// default: { return 0; }
+// }
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ }
unsigned int end_segment_vertex_offset() const {
switch (render_primitive_type)
{
@@ -234,7 +336,17 @@ class GCodeViewer
}
}
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ bool has_data() const {
+ return !vertices.ids.empty() && vertices.ids.front() != 0 && !indices.empty() && indices.front().ibo != 0;
+ }
+#else
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
bool has_data() const { return vertices.id != 0 && !indices.empty() && indices.front().id != 0; }
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
};
// helper to render shells
@@ -309,6 +421,13 @@ class GCodeViewer
{
size_t first{ 0 };
size_t last{ 0 };
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ bool operator == (const Endpoints& other) const {
+ return first == other.first && last == other.last;
+ }
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
};
private:
@@ -316,14 +435,12 @@ class GCodeViewer
std::vector<Endpoints> m_endpoints;
public:
- void append(double z, Endpoints endpoints)
- {
+ void append(double z, Endpoints endpoints) {
m_zs.emplace_back(z);
m_endpoints.emplace_back(endpoints);
}
- void reset()
- {
+ void reset() {
m_zs = std::vector<double>();
m_endpoints = std::vector<Endpoints>();
}
@@ -335,6 +452,19 @@ class GCodeViewer
std::vector<Endpoints>& get_endpoints() { return m_endpoints; }
double get_z_at(unsigned int id) const { return (id < m_zs.size()) ? m_zs[id] : 0.0; }
Endpoints get_endpoints_at(unsigned int id) const { return (id < m_endpoints.size()) ? m_endpoints[id] : Endpoints(); }
+
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+#if ENABLE_SPLITTED_VERTEX_BUFFER
+ bool operator != (const Layers& other) const {
+ if (m_zs != other.m_zs)
+ return true;
+ if (!(m_endpoints == other.m_endpoints))
+ return true;
+
+ return false;
+ }
+#endif // ENABLE_SPLITTED_VERTEX_BUFFER
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
};
#if ENABLE_GCODE_VIEWER_STATISTICS
@@ -363,8 +493,10 @@ class GCodeViewer
int64_t extrude_segments_count{ 0 };
int64_t vbuffers_count{ 0 };
int64_t ibuffers_count{ 0 };
- int64_t max_vertices_in_vertex_buffer{ 0 };
- int64_t max_indices_in_index_buffer{ 0 };
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+// int64_t max_vertices_in_vertex_buffer{ 0 };
+// int64_t max_indices_in_index_buffer{ 0 };
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
void reset_all() {
reset_times();
@@ -402,8 +534,10 @@ class GCodeViewer
extrude_segments_count = 0;
vbuffers_count = 0;
ibuffers_count = 0;
- max_vertices_in_vertex_buffer = 0;
- max_indices_in_index_buffer = 0;
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+// max_vertices_in_vertex_buffer = 0;
+// max_indices_in_index_buffer = 0;
+//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
}
};
#endif // ENABLE_GCODE_VIEWER_STATISTICS