diff options
author | Wilrik de Loose <wilrik@wilrik.nl> | 2008-01-10 22:18:46 (GMT) |
---|---|---|
committer | Wilrik de Loose <wilrik@wilrik.nl> | 2008-01-10 22:18:46 (GMT) |
commit | 398578956e01518523a05d4245a2ce488955cf97 (patch) | |
tree | 7adacc47cf4a6b35eac9af0a07a39f790d9dc29e /Smoke/renderer_gl.c | |
parent | c8c41f2f654c3a5283a299c27fd29fd47aaafe4f (diff) | |
download | 2iv35-398578956e01518523a05d4245a2ce488955cf97.zip 2iv35-398578956e01518523a05d4245a2ce488955cf97.tar.gz 2iv35-398578956e01518523a05d4245a2ce488955cf97.tar.bz2 |
'streamlines'
Diffstat (limited to 'Smoke/renderer_gl.c')
-rw-r--r-- | Smoke/renderer_gl.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c index cd2e5c8..0f91404 100644 --- a/Smoke/renderer_gl.c +++ b/Smoke/renderer_gl.c @@ -736,18 +736,16 @@ static void render_streamlines(void) i = j = k = l = 0; DIM = fluids_get_dim(); - -#if 0 for (i = 0; i < get_cur_seedpoint(); i++) { p = get_seedpoint(i); glBegin(GL_LINE_STRIP); - frame_history = streamlines_get_history_scalars(i); - for (j = 0; j < HISTORY_SIZE; j++) { + frame_history = streamlines_get_history_scalars(j); + cell_x = (fftw_real)winWidth / (fftw_real)(DIM + 1); // Grid cell width cell_y = (fftw_real)winHeight / (fftw_real)(DIM + 1); // Grid cell heigh @@ -756,14 +754,13 @@ static void render_streamlines(void) idx = (int)(cell_x * cell_y); - vx = (float)frame_history[j].x[idx]; - vy = (float)frame_history[j].y[idx]; + vx = (float)frame_history->x[idx]; + vy = (float)frame_history->y[idx]; - glVertex3f(p.x + vx, winHeight - p.y + vy, 0.0f - j * cell_x); + glVertex3f(p.x + (vx * 10000), winHeight - p.y + (vy * 10000), 0.0f - j * cell_x); } glEnd(); } -#endif } static void render_flowvis(void) @@ -965,9 +962,8 @@ void visualize(struct vis_data_arrays *vis_data) render_glyphs(); } - render_seedpoints(); - if (streamlines_get_render()) { + render_seedpoints(); render_streamlines(); } |