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.c57
1 files changed, 28 insertions, 29 deletions
diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c
index 01205fe..8cc2095 100644
--- a/Smoke/renderer_gl.c
+++ b/Smoke/renderer_gl.c
@@ -572,9 +572,10 @@ static void render_glyphs(void)
float scale, idxcf, idxrf;
struct color4f color;
fftw_real *frame_color;
- struct fftw_real_xy_p frames_direction;
+ struct fftw_real_xy frames_direction;
+ GLUquadricObj *qobj;
- GLUquadricObj *qobj = gluNewQuadric();
+ qobj = gluNewQuadric();
gluQuadricDrawStyle(qobj, GLU_FILL);
gluQuadricNormals(qobj, GLU_SMOOTH);
@@ -597,7 +598,7 @@ static void render_glyphs(void)
render_glyph(qobj, frames_direction.x[idx], frames_direction.y[idx], i, j);
}
}
-
+
gluDeleteQuadric(qobj);
}
@@ -971,7 +972,6 @@ void visualize(struct vis_data_arrays *vis_data)
if (renderer_render_grid) {
render_grid();
}
-
if (smoke_get_render())
{
if (smoke_get_sort() == SMOKE_FLUID)
@@ -1011,32 +1011,31 @@ void visualize(struct vis_data_arrays *vis_data)
}
render_streamlines();
+ //create an orthographic projection matrix for rendering the legendbar
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+
+ glLoadIdentity();
+
+ //create an orthographic viewing volume with the same dimensions as the
+ //window in front of the previous viewing volume
+ //from znear = 0.0 to zfar = 1.0
+ glOrtho(0.0, (GLfloat)winWidth, 0.0, (GLfloat)winHeight, 0.0, 1.0);
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix(); //save the current modelview matrix
+
+ glLoadIdentity();
+
+ //now render the legendbar
+ render_legend();
+
+ //restore the previous modelview matrix
+ glPopMatrix();
+
+ //restore the previous projection matrix
+ glMatrixMode(GL_PROJECTION);
- //create an orthographic projection matrix for rendering the legendbar
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
-
- glLoadIdentity();
-
- //create an orthographic viewing volume with the same dimensions as the
- //window in front of the previous viewing volume
- //from znear = 0.0 to zfar = 1.0
- glOrtho(0.0, (GLfloat)winWidth, 0.0, (GLfloat)winHeight, 0.0, 1.0);
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix(); //save the current modelview matrix
-
- glLoadIdentity();
-
- //now render the legendbar
- render_legend();
-
- //restore the previous modelview matrix
- glPopMatrix();
-
- //restore the previous projection matrix
- glMatrixMode(GL_PROJECTION);
-
- glPopMatrix();
+ glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();