mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
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.
This commit is contained in:
@@ -1021,7 +1021,7 @@ sub Render {
|
|||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
glColor4f(0.8, 0.6, 0.5, 0.4);
|
glColor4f(0.8, 0.6, 0.5, 0.4);
|
||||||
glNormal3d(0,0,1);
|
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);
|
glDrawArrays(GL_TRIANGLES, 0, $self->bed_triangles->elements / 3);
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
glDisableClientState(GL_VERTEX_ARRAY);
|
||||||
|
|
||||||
@@ -1033,7 +1033,7 @@ sub Render {
|
|||||||
glLineWidth(3);
|
glLineWidth(3);
|
||||||
glColor4f(0.2, 0.2, 0.2, 0.4);
|
glColor4f(0.2, 0.2, 0.2, 0.4);
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
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);
|
glDrawArrays(GL_LINES, 0, $self->bed_grid_lines->elements / 3);
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
glDisableClientState(GL_VERTEX_ARRAY);
|
||||||
|
|
||||||
@@ -1259,7 +1259,7 @@ sub draw_volumes {
|
|||||||
if (defined $self->cutting_plane_z) {
|
if (defined $self->cutting_plane_z) {
|
||||||
glLineWidth(2);
|
glLineWidth(2);
|
||||||
glColor3f(0, 0, 0);
|
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);
|
glDrawArrays(GL_LINES, 0, $self->cut_lines_vertices->elements / 3);
|
||||||
glVertexPointer_c(3, GL_FLOAT, 0, 0);
|
glVertexPointer_c(3, GL_FLOAT, 0, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user