def get_loosevert_co(self, index):
     bgl.glBindVertexArray(self.vao[0])
     bgl.glBindBuffer(bgl.GL_ARRAY_BUFFER, self.vbo_verts[0])
     bgl.glGetBufferSubData(bgl.GL_ARRAY_BUFFER, index * 12, 12,
                            self.vert_co)
     bgl.glBindVertexArray(0)
     return self.vert_co
 def get_edge_co(self, index):
     bgl.glBindVertexArray(self.vao[0])
     bgl.glBindBuffer(bgl.GL_ARRAY_BUFFER, self.vbo_edges[0])
     bgl.glGetBufferSubData(bgl.GL_ARRAY_BUFFER, index * 24, 24,
                            self.edge_co)
     bgl.glBindVertexArray(0)
     return self.edge_co
 def get_tri_co(self, index):
     bgl.glBindVertexArray(self.vao[0])
     bgl.glBindBuffer(bgl.GL_ARRAY_BUFFER, self.vbo_tris[0])
     bgl.glGetBufferSubData(bgl.GL_ARRAY_BUFFER, index * 36, 36,
                            self.tri_co)
     bgl.glBindVertexArray(0)
     return self.tri_co
Exemplo n.º 4
0
 def get_bounds_co(self, index):
     bgl.glBindVertexArray(self.vao[0])
     check_error("glBindVertexArray(self.vao[0])")
     bgl.glBindBuffer(bgl.GL_ARRAY_BUFFER, self.vbo_bounds_co[0])
     check_error("glBindBuffer")
     bgl.glGetBufferSubData(bgl.GL_ARRAY_BUFFER, index * 12, 12, self.bounds_co)
     check_error("glGetBufferSubData")
     bgl.glBindVertexArray(0)
     check_error("glBindVertexArray(0)")
     return self.bounds_co
Exemplo n.º 5
0
 def get_loosevert_co(self, index):
     bgl.glBindVertexArray(self.vao[0])
     bgl.glBindBuffer(bgl.GL_ARRAY_BUFFER, self.vbo_verts[0])
     bgl.glGetBufferSubData(bgl.GL_ARRAY_BUFFER, index * 12, 12, self.vert_co)
     bgl.glBindVertexArray(0)
     return self.vert_co
Exemplo n.º 6
0
 def get_edge_co(self, index):
     bgl.glBindVertexArray(self.vao[0])
     bgl.glBindBuffer(bgl.GL_ARRAY_BUFFER, self.vbo_edges[0])
     bgl.glGetBufferSubData(bgl.GL_ARRAY_BUFFER, index * 24, 24, self.edge_co)
     bgl.glBindVertexArray(0)
     return self.edge_co
Exemplo n.º 7
0
 def get_tri_co(self, index):
     bgl.glBindVertexArray(self.vao[0])
     bgl.glBindBuffer(bgl.GL_ARRAY_BUFFER, self.vbo_tris[0])
     bgl.glGetBufferSubData(bgl.GL_ARRAY_BUFFER, index * 36, 36, self.tri_co)
     bgl.glBindVertexArray(0)
     return self.tri_co