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.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/Smoke/renderer_gl.c b/Smoke/renderer_gl.c
index 62f513f..1e2e27c 100644
--- a/Smoke/renderer_gl.c
+++ b/Smoke/renderer_gl.c
@@ -352,6 +352,8 @@ int LoadTextures(void)
status = FALSE;
}
+ glBindTexture(GL_TEXTURE_2D, NULL);
+
return status;
} // LoadTextures
@@ -373,7 +375,7 @@ static void render_glyph(GLUquadricObj *qobj, float x_value, float y_value, floa
x0 = wn + (fftw_real)i * wn;
y0 = hn + (fftw_real)j * hn;
- z0 = 0.0f;
+ z0 = 100.0f;
x1 = x0 + (vec_scale * x_value)/4;
y1 = y0 + (vec_scale * y_value)/4;
@@ -411,9 +413,9 @@ static void render_glyph(GLUquadricObj *qobj, float x_value, float y_value, floa
glTranslatef(-x0, -y0, -z0);
glBegin(GL_TRIANGLE_STRIP);
- glVertex2d(-10 * size + x0, -25 * size + y0);
- glVertex2d( 0 * size + x0, 25 * size + y0);
- glVertex2d( 10 * size + x0, -25 * size + y0);
+ glVertex3f(-10 * size + x0, -25 * size + y0, z0);
+ glVertex3f( 0 * size + x0, 25 * size + y0, z0);
+ glVertex3f( 10 * size + x0, -25 * size + y0, z0);
glEnd();
glRotatef(-theta, 0.0, 0.0, 1.0);
@@ -444,18 +446,20 @@ static void render_glyph(GLUquadricObj *qobj, float x_value, float y_value, floa
glPushMatrix();
+ glBindTexture(GL_TEXTURE_2D, texture[0]);
glTranslatef(x0, y0, z0);
glRotatef(theta, 0.0, 0.0, 1.0);
glTranslatef(-x0, -y0, -z0);
glBegin(GL_TRIANGLE_STRIP);
- glTexCoord2f(1, 1); glVertex2d( 20 * size + x0, 20 * size + y0);
- glTexCoord2f(0, 1); glVertex2d(-20 * size + x0, 20 * size + y0);
- glTexCoord2f(1, 0); glVertex2d( 20 * size + x0, -20 * size + y0);
- glTexCoord2f(0, 0); glVertex2d(-20 * size + x0, -20 * size + y0);
+ glTexCoord2f(1, 1); glVertex3f( 20 * size + x0, 20 * size + y0, z0);
+ glTexCoord2f(0, 1); glVertex3f(-20 * size + x0, 20 * size + y0, z0);
+ glTexCoord2f(1, 0); glVertex3f( 20 * size + x0, -20 * size + y0, z0);
+ glTexCoord2f(0, 0); glVertex3f(-20 * size + x0, -20 * size + y0, z0);
glEnd();
glRotatef(-theta, 0.0, 0.0, 1.0);
+ glBindTexture(GL_TEXTURE_2D, NULL);
glPopMatrix();
break;