Commit f4dc4639 authored by Guillaume Seguin's avatar Guillaume Seguin

No need to do if use_vbo check, .ptr value for vbos is 0

parent 56803dc7
...@@ -584,10 +584,7 @@ class GcodeModel(Model): ...@@ -584,10 +584,7 @@ class GcodeModel(Model):
def _display_travels(self, has_vbo): def _display_travels(self, has_vbo):
self.travel_buffer.bind() self.travel_buffer.bind()
if has_vbo: glVertexPointer(3, GL_FLOAT, 0, self.travel_buffer.ptr)
glVertexPointer(3, GL_FLOAT, 0, None)
else:
glVertexPointer(3, GL_FLOAT, 0, self.travel_buffer.ptr)
# TODO: show current layer travels in a different color # TODO: show current layer travels in a different color
end = self.layer_stops[min(self.num_layers_to_draw, self.max_layers)] end = self.layer_stops[min(self.num_layers_to_draw, self.max_layers)]
...@@ -616,22 +613,13 @@ class GcodeModel(Model): ...@@ -616,22 +613,13 @@ class GcodeModel(Model):
def _display_movements(self, has_vbo): def _display_movements(self, has_vbo):
self.vertex_buffer.bind() self.vertex_buffer.bind()
if has_vbo: glVertexPointer(3, GL_FLOAT, 0, self.vertex_buffer.ptr)
glVertexPointer(3, GL_FLOAT, 0, None)
else:
glVertexPointer(3, GL_FLOAT, 0, self.vertex_buffer.ptr)
self.vertex_color_buffer.bind() self.vertex_color_buffer.bind()
if has_vbo: glColorPointer(3, GL_FLOAT, 0, self.vertex_color_buffer.ptr)
glColorPointer(3, GL_FLOAT, 0, None)
else:
glColorPointer(3, GL_FLOAT, 0, self.vertex_color_buffer.ptr)
self.vertex_normal_buffer.bind() self.vertex_normal_buffer.bind()
if has_vbo: glNormalPointer(GL_FLOAT, 0, self.vertex_normal_buffer.ptr)
glNormalPointer(GL_FLOAT, 0, None)
else:
glNormalPointer(GL_FLOAT, 0, self.vertex_normal_buffer.ptr)
self.index_buffer.bind() self.index_buffer.bind()
......
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