diff options
author | Wilrik de Loose <wilrik@wilrik.nl> | 2008-01-10 21:12:21 (GMT) |
---|---|---|
committer | Wilrik de Loose <wilrik@wilrik.nl> | 2008-01-10 21:12:21 (GMT) |
commit | 2cb09ad476b1f20ff02200ca70aab489c8c06300 (patch) | |
tree | aa715ab8588e90ba488c4ff8d95dee424cad52b3 /Smoke/renderer_gl.c | |
parent | 37e4a2a9857669837417b0b5e6ba35248bec9030 (diff) | |
download | 2iv35-2cb09ad476b1f20ff02200ca70aab489c8c06300.zip 2iv35-2cb09ad476b1f20ff02200ca70aab489c8c06300.tar.gz 2iv35-2cb09ad476b1f20ff02200ca70aab489c8c06300.tar.bz2 |
lilkieusd1342^%$^&U*(x
Diffstat (limited to 'Smoke/renderer_gl.c')
-rw-r--r-- | Smoke/renderer_gl.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c index c8e6274..0476df1 100644 --- a/Smoke/renderer_gl.c +++ b/Smoke/renderer_gl.c @@ -762,9 +762,9 @@ static void render_isolines(void) static void render_streamlines(void) { int i, j, k, l, idx, idx_x, idx_y, DIM; - float v; + float vx, vy; struct point p; - fftw_real *frame_history; + struct fftw_real_xy *frame_history; fftw_real cell_x, cell_y; i = j = k = l = 0; @@ -776,10 +776,10 @@ static void render_streamlines(void) glBegin(GL_LINE_STRIP); + frame_history = streamlines_get_history_scalars(); + for (j = 0; j < HISTORY_SIZE; j++) { - frame_history = flowvis_get_history(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 @@ -788,9 +788,10 @@ static void render_streamlines(void) idx = (int)(cell_x * cell_y); - v = (float)frame_history[idx]; + vx = (float)frame_history[j].x[idx]; + vy = (float)frame_history[j].y[idx]; - glVertex3f(p.x + v, winHeight - p.y, 0.0f - j * 10.0f); + glVertex3f(p.x + vx, winHeight - p.y + vy, 0.0f - j * cell_x); } glEnd(); } |