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 --- channel_2d_streamlines_gl_interop.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'channel_2d_streamlines_gl_interop.py') diff --git a/channel_2d_streamlines_gl_interop.py b/channel_2d_streamlines_gl_interop.py index c1aa1e8..7c370a2 100644 --- a/channel_2d_streamlines_gl_interop.py +++ b/channel_2d_streamlines_gl_interop.py @@ -137,16 +137,15 @@ lattice.apply_material_map( get_channel_material_map(lattice.geometry)) lattice.sync_material() -moments_vbo = MomentsVertexBuffer(lattice) streamline_texture = Streamlines( - lattice, moments_vbo, + lattice, list(map(lambda y: [2, y*lattice.geometry.size_y//48], range(1,48)))) def on_display(): for i in range(0,updates_per_frame): lattice.evolve() - moments_vbo.collect() + lattice.update_moments() streamline_texture.update() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) -- cgit v1.2.3