diff options
Use lattice-internal moments buffer for particles
Diffstat (limited to 'utility')
-rw-r--r-- | utility/opengl.py | 2 | ||||
-rw-r--r-- | utility/particles.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/utility/opengl.py b/utility/opengl.py index e201e29..1037cbd 100644 --- a/utility/opengl.py +++ b/utility/opengl.py @@ -123,6 +123,7 @@ class MomentsTexture: self.lattice.grid.size(), self.lattice.layout, self.lattice.memory.cl_pop_b, + self.lattice.memory.cl_material, self.cl_gl_moments) else: self.program.collect_gl_moments_to_texture( @@ -130,5 +131,6 @@ class MomentsTexture: self.lattice.grid.size(), self.lattice.layout, self.lattice.memory.cl_pop_a, + self.lattice.memory.cl_material, self.cl_gl_moments) diff --git a/utility/particles.py b/utility/particles.py index 4b770bd..75d2245 100644 --- a/utility/particles.py +++ b/utility/particles.py @@ -10,12 +10,11 @@ import OpenGL.GL as gl from OpenGL.arrays import vbo class Particles: - def __init__(self, lattice, moments, grid): + def __init__(self, lattice, grid): 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(grid) self.np_particles = numpy.ndarray(shape=(self.count, 4), dtype=self.float_type) @@ -64,7 +63,7 @@ class Particles: self.program.update_particles( self.queue, (self.count,1), None, - self.moments.cl_gl_moments, + self.lattice.memory.cl_moments, self.lattice.memory.cl_material, self.cl_gl_particles, self.cl_init_particles, age) |