From e733f359102ce54c89c4ff5221c305cabe307a04 Mon Sep 17 00:00:00 2001 From: Wilrik de Loose Date: Thu, 3 Jan 2008 16:34:14 +0000 Subject: --- Smoke/Week 2.ncb | Bin 15518720 -> 15518720 bytes Smoke/Week 2.suo | Bin 56320 -> 57344 bytes Smoke/fluids.c | 2 +- Smoke/gtk.c | 5 ++++- Smoke/renderer_gl.c | 19 ++++++++----------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Smoke/Week 2.ncb b/Smoke/Week 2.ncb index b98bf23..a5b3b56 100644 Binary files a/Smoke/Week 2.ncb and b/Smoke/Week 2.ncb differ diff --git a/Smoke/Week 2.suo b/Smoke/Week 2.suo index 2f031f1..95f90c5 100644 Binary files a/Smoke/Week 2.suo and b/Smoke/Week 2.suo differ diff --git a/Smoke/fluids.c b/Smoke/fluids.c index 1613edf..46c7a2b 100644 --- a/Smoke/fluids.c +++ b/Smoke/fluids.c @@ -36,7 +36,7 @@ rfftwnd_plan plan_rc, plan_cr; //simulation domain discretization int winWidth, winHeight; //size of the graphics window, in pixels int color_dir = 0; //use direction color-coding or not float vec_scale = 1000; //scaling of hedgehogs -int vis_dataset = DATASET_VEL; +int vis_dataset = DATASET_RHO; int active_slider = 0; int glyph_scalar = SCALAR_RHO; int glyph_vector = VECTOR_VEL; diff --git a/Smoke/gtk.c b/Smoke/gtk.c index f2daa5a..3a1b310 100644 --- a/Smoke/gtk.c +++ b/Smoke/gtk.c @@ -78,8 +78,11 @@ #define DEFAULT_HEIGHT 600 #define DEFAULT_TITLE "2iv35 \"Smoke\" by Wilrik & Oliver" +#ifdef G_OS_WIN32 +#define TIMEOUT_INTERVAL 30 +#else #define TIMEOUT_INTERVAL 20 - +#endif /************************************************************************** * Global variable declarations. diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c index 2290f9f..41f8f22 100644 --- a/Smoke/renderer_gl.c +++ b/Smoke/renderer_gl.c @@ -48,7 +48,7 @@ float y_pos = DEFAULT_Y_POS; float z_pos = DEFAULT_ZOOM; static int renderer_zoomspeed = DEFAULT_ZOOM_SPEED; -static int normals_render = TRUE; +static int normals_render = FALSE; static void render_legend(void) { @@ -57,6 +57,7 @@ static void render_legend(void) glDisable(GL_LIGHTING); glDisable(GL_DEPTH_TEST); + glDisable(GL_BLEND); glLoadIdentity(); glTranslatef(LEGEND_X_POS, LEGEND_Y_POS, LEGEND_Z_POS); @@ -129,6 +130,7 @@ static void render_legend(void) glEnd(); } + glEnable(GL_BLEND); glEnable(GL_LIGHTING); glEnable(GL_DEPTH_TEST); } @@ -380,7 +382,7 @@ static void render_isolines(void) int state = 0; static int prev_state = 0; struct color4f color; - float threshold; + float threshold, max; v0 = v1 = v2 = v3 = 0.0f; x0 = y0 = x1 = y1 = 0.0f; @@ -388,8 +390,6 @@ static void render_isolines(void) threshold = min(threshold1, threshold2) + count * iso_scale; glDisable(GL_LIGHTING); - - glLineWidth(2.0f); glBegin(GL_LINES); for (i = 0; i < DIM - 1; i++) @@ -426,11 +426,8 @@ static void render_isolines(void) x1 = (threshold / max(v1, v0)) * wn; y1 = hn; - if (x0 != y0 != x1 != y1 != 0.0f) - { - glVertex3i(x_offset + x0, y_offset + y0, 5.0f); - glVertex3i(x_offset + x1, y_offset + y1, 5.0f); - } + glVertex3i(x_offset + x0, y_offset + y0, 5.0f); + glVertex3i(x_offset + x1, y_offset + y1, 5.0f); // no break !! case 4: case 11: @@ -492,8 +489,8 @@ static void render_isolines(void) } // draw line - glVertex3i(x_offset + x0 + 0.2f, y_offset + y0 + 0.2f, 5.0f); - glVertex3i(x_offset + x1 + 0.2f, y_offset + y1 + 0.2f, 5.0f); + glVertex3i(x_offset + x0, y_offset + y0, 5.0f); + glVertex3i(x_offset + x1, y_offset + y1, 5.0f); } } -- cgit v0.12