diff options
Diffstat (limited to 'Smoke/renderer_gl.c')
-rw-r--r-- | Smoke/renderer_gl.c | 19 |
1 files changed, 8 insertions, 11 deletions
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); } } |