From 621dec0f2b7a982c958cce4d7baa4ccd3994606a Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 19 Jun 2020 21:30:34 +0200 Subject: Use OpenCL buffer to access moments in streamline impl --- utility/streamline.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'utility/streamline.py') diff --git a/utility/streamline.py b/utility/streamline.py index 5111fc2..9f0fb55 100644 --- a/utility/streamline.py +++ b/utility/streamline.py @@ -10,12 +10,11 @@ from OpenGL.GL import * from OpenGL.arrays import vbo class Streamlines: - def __init__(self, lattice, moments, origins): + def __init__(self, lattice, origins): self.lattice = lattice self.context = self.lattice.context self.queue = self.lattice.queue self.float_type = self.lattice.memory.float_type - self.moments = moments self.count = len(origins) self.np_origins = numpy.ndarray(shape=(self.count, 2), dtype=self.float_type) @@ -66,7 +65,7 @@ class Streamlines: self.program.draw_streamline( self.queue, (self.count,1), None, - self.moments.cl_gl_moments, + self.lattice.memory.cl_moments, self.lattice.memory.cl_material, self.cl_origins, self.cl_gl_streamlines) -- cgit v1.2.3