summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-11-09 09:54:09 -0800
committerEric Anholt <eric@anholt.net>2009-11-09 09:54:09 -0800
commit53d635423bbbdb1fc1c38dbe1ad3072584abc07f (patch)
treeb5f74ef1379b6098d016548d7fd92229b94daa99
parentf1c2b054c29bebed6adc4518d201e12c0ba75e02 (diff)
Update for GLU3 API changes.
-rw-r--r--glass.c21
-rw-r--r--matrix.c8
2 files changed, 15 insertions, 14 deletions
diff --git a/glass.c b/glass.c
index 3b72bc0..14e1719 100644
--- a/glass.c
+++ b/glass.c
@@ -146,9 +146,10 @@ update_light_position(void)
print_GLUmat4("light_world_matrix", &light_world_matrix);
*/
- gluTranslate3(&temp, -eye_world.values[0],
- -eye_world.values[1],
- -eye_world.values[2]);
+ gluTranslate3f(&temp,
+ -eye_world.values[0],
+ -eye_world.values[1],
+ -eye_world.values[2]);
gluMult4m_4m(&light_eye_matrix, &temp, &light_world_matrix);
gluMult4m_4v(&light_eye, &light_eye_matrix, &light_start_world);
@@ -190,10 +191,10 @@ calc_new_ring_transforms(int instance)
break;
}
/* Move them out into their position in the cube. */
- gluTranslate3(&temp,
- x_index * 5.0,
- 10 + y_index * 5.0,
- 4.0 + z_index * 5.0);
+ gluTranslate3f(&temp,
+ x_index * 5.0,
+ 10 + y_index * 5.0,
+ 4.0 + z_index * 5.0);
gluMult4m_4m(&ring_obj_to_world[instance], &temp, &obj_to_world);
/* Calculate the bounding sphere of the set of rings, for use in
@@ -302,9 +303,9 @@ reshape(int width, int height)
if (sdl_surf == NULL)
errx(1, "video mode set fail\n");
- gluPerspective4(&projection, 80,
- (float)win_width / (float)win_height,
- 0.2, 40);
+ gluPerspective4f(&projection, 80,
+ (float)win_width / (float)win_height,
+ 0.2, 40);
}
static GLint
diff --git a/matrix.c b/matrix.c
index f81d830..3f12c08 100644
--- a/matrix.c
+++ b/matrix.c
@@ -255,8 +255,8 @@ make_sphere_frustum(GLUmat4 *mat,
near_radius = near * radius / sqrt(near * near + 2.0 * near * radius);
- gluFrustum6(mat,
- -near_radius, near_radius,
- -near_radius, near_radius,
- near, far);
+ gluFrustum6f(mat,
+ -near_radius, near_radius,
+ -near_radius, near_radius,
+ near, far);
}