aboutsummaryrefslogtreecommitdiff
path: root/channel_2d_streamlines_gl_interop.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-06-19 21:30:34 +0200
committerAdrian Kummerlaender2020-06-19 21:30:34 +0200
commit621dec0f2b7a982c958cce4d7baa4ccd3994606a (patch)
tree70d5e43ee78e118594c61986fa6980e893dc229e /channel_2d_streamlines_gl_interop.py
parentbe7de4a18bdfd89fbd1fdc852d170f68cdc65ba4 (diff)
downloadsymlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.gz
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.bz2
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.lz
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.xz
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.tar.zst
symlbm_playground-621dec0f2b7a982c958cce4d7baa4ccd3994606a.zip
Use OpenCL buffer to access moments in streamline impl
Diffstat (limited to 'channel_2d_streamlines_gl_interop.py')
-rw-r--r--channel_2d_streamlines_gl_interop.py5
1 files changed, 2 insertions, 3 deletions
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)