From c0b3de6248f6e6d50624b3d2132c823fb65af95e Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 20 Jan 2017 16:56:37 +0100 Subject: [PATCH] Hopefully fixes https://github.com/prusa3d/Slic3r/issues/90 Latest master segfaults with perl 5.24.1 #90 The fix achives similar goal to https://github.com/alexrj/Slic3r/pull/3575 but it is simpler. --- lib/Slic3r/GUI/3DScene.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm index 8acb9ba27..8a9713807 100644 --- a/lib/Slic3r/GUI/3DScene.pm +++ b/lib/Slic3r/GUI/3DScene.pm @@ -1021,7 +1021,7 @@ sub Render { glEnableClientState(GL_VERTEX_ARRAY); glColor4f(0.8, 0.6, 0.5, 0.4); glNormal3d(0,0,1); - glVertexPointer_p(3, $self->bed_triangles); + glVertexPointer_c(3, GL_FLOAT, 0, $self->bed_triangles->ptr()); glDrawArrays(GL_TRIANGLES, 0, $self->bed_triangles->elements / 3); glDisableClientState(GL_VERTEX_ARRAY); @@ -1033,7 +1033,7 @@ sub Render { glLineWidth(3); glColor4f(0.2, 0.2, 0.2, 0.4); glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer_p(3, $self->bed_grid_lines); + glVertexPointer_c(3, GL_FLOAT, 0, $self->bed_grid_lines->ptr()); glDrawArrays(GL_LINES, 0, $self->bed_grid_lines->elements / 3); glDisableClientState(GL_VERTEX_ARRAY); @@ -1259,7 +1259,7 @@ sub draw_volumes { if (defined $self->cutting_plane_z) { glLineWidth(2); glColor3f(0, 0, 0); - glVertexPointer_p(3, $self->cut_lines_vertices); + glVertexPointer_c(3, GL_FLOAT, 0, $self->cut_lines_vertices->ptr()); glDrawArrays(GL_LINES, 0, $self->cut_lines_vertices->elements / 3); glVertexPointer_c(3, GL_FLOAT, 0, 0); }