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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2022-07-23 17:04:03 +0300
committersupermerill <merill@free.fr>2022-07-24 02:45:17 +0300
commit3ce5d1a4e1ea3fce0a8f869cad581370a49e7dcd (patch)
tree244a6f160442c82c41e7d7aa278e3fbdff5e784b
parenta460d8cb45b9d236cb81d62872151aa900a1d609 (diff)
render vertices_and_normals_interleaved_VBO_id assert fix?
-rw-r--r--src/slic3r/GUI/3DScene.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp
index 0bde4a878..ddbbef931 100644
--- a/src/slic3r/GUI/3DScene.cpp
+++ b/src/slic3r/GUI/3DScene.cpp
@@ -256,6 +256,12 @@ void GLIndexedVertexArray::render(
const std::pair<size_t, size_t>& tverts_range,
const std::pair<size_t, size_t>& qverts_range) const
{
+ // nothing to draw (TODO: this theis thing. I addede as it triggers the assert when everything is empty)
+ if (this->vertices_and_normals_interleaved_size == 0) {
+ assert(this->vertices_and_normals_interleaved_VBO_id == 0);
+ return;
+ }
+
// this method has been called before calling finalize() ?
if (this->vertices_and_normals_interleaved_VBO_id == 0 && !this->vertices_and_normals_interleaved.empty())
return;