コード例 #1
0
ファイル: actors.py プロジェクト: ptitleud/Printrun
 def _draw_elements(self, start, end, draw_type = GL_TRIANGLES):
     glDrawRangeElements(draw_type,
                         self.count_print_vertices[start - 1],
                         self.count_print_vertices[end] - 1,
                         self.count_print_indices[end] - self.count_print_indices[start - 1],
                         GL_UNSIGNED_INT,
                         sizeof(GLuint) * self.count_print_indices[start - 1])
コード例 #2
0
 def _draw_elements(self, start, end, draw_type=GL_TRIANGLES):
     # Don't attempt printing empty layer
     if self.count_print_indices[end] == self.count_print_indices[start -
                                                                  1]:
         return
     glDrawRangeElements(
         draw_type, self.count_print_vertices[start - 1],
         self.count_print_vertices[end] - 1, self.count_print_indices[end] -
         self.count_print_indices[start - 1], GL_UNSIGNED_INT,
         sizeof(GLuint) * self.count_print_indices[start - 1])
コード例 #3
0
ファイル: actors.py プロジェクト: pavlog/Printrun
 def _draw_elements(self, start, end, draw_type = GL_TRIANGLES):
     # Don't attempt printing empty layer
     if self.count_print_indices[end] == self.count_print_indices[start - 1]:
         return
     glDrawRangeElements(draw_type,
                         self.count_print_vertices[start - 1],
                         self.count_print_vertices[end] - 1,
                         self.count_print_indices[end] - self.count_print_indices[start - 1],
                         GL_UNSIGNED_INT,
                         sizeof(GLuint) * self.count_print_indices[start - 1])