Commit 85de40f8 authored by Guillaume Seguin's avatar Guillaume Seguin

Fix crasher in new 3D viz

Normals are not defined for travel moves, so we need to enable the array
after drawing them, not before
parent f4dc4639
......@@ -559,13 +559,13 @@ class GcodeModel(Model):
glPushMatrix()
glTranslatef(self.offset_x, self.offset_y, 0)
glEnableClientState(GL_VERTEX_ARRAY)
glEnableClientState(GL_NORMAL_ARRAY)
has_vbo = isinstance(self.vertex_buffer, VertexBufferObject)
if self.display_travels:
self._display_travels(has_vbo)
glEnable(GL_LIGHTING)
glEnableClientState(GL_NORMAL_ARRAY)
glEnableClientState(GL_COLOR_ARRAY)
glMaterialfv(GL_FRONT, GL_SPECULAR, vec(1, 1, 1, 1))
glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, vec(0, 0, 0, 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment