summaryrefslogtreecommitdiffstats
path: root/Smoke/renderer_gl.c
diff options
context:
space:
mode:
Diffstat (limited to 'Smoke/renderer_gl.c')
-rw-r--r--Smoke/renderer_gl.c16
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();
}