summaryrefslogtreecommitdiffstats
path: root/Smoke/renderer_gl.c
diff options
context:
space:
mode:
authorWilrik de Loose <wilrik@wilrik.nl>2008-01-08 13:31:15 (GMT)
committerWilrik de Loose <wilrik@wilrik.nl>2008-01-08 13:31:15 (GMT)
commit0ce08ace350d6cc856304a428896c4477876159c (patch)
tree04733a0a2569ae5910446a48e4d59e64a087f512 /Smoke/renderer_gl.c
parenta570135d7b6167a56f98ee392fea8dc943168fd5 (diff)
download2iv35-0ce08ace350d6cc856304a428896c4477876159c.zip
2iv35-0ce08ace350d6cc856304a428896c4477876159c.tar.gz
2iv35-0ce08ace350d6cc856304a428896c4477876159c.tar.bz2
+ verslag
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;