diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c
index ec99eb307d747a145f390343b7c938a36215f0b1..9ac70e96ae288bd88bcd53d540f81a2e5563c347 100644
--- a/src/hardware/r_opengl/r_opengl.c
+++ b/src/hardware/r_opengl/r_opengl.c
@@ -1404,7 +1404,7 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo  *pSurf,
 
 typedef struct vbo_vertex_s
 {
-	double x, y, z;
+	float x, y, z;
 	float u, v;
 	unsigned char r, g, b, a;
 } vbo_vertex_t;
@@ -1448,17 +1448,17 @@ static INT32 lasttex = -1;
 
 static void SkyVertex(vbo_vertex_t *vbo, int r, int c)
 {
-	const double radians = (M_PIl / 180.0f);
-	const double scale = 10000.0f;
+	const float radians = (float)(M_PIl / 180.0f);
+	const float scale = 10000.0f;
 	const float maxSideAngle = 60.0f;
 
 	float topAngle = (c / (float)columns * 360.0f);
 	float sideAngle = (maxSideAngle * (rows - r) / rows);
-	double height = sin(sideAngle * radians);
-	double realRadius = scale * cos(sideAngle * radians);
-	double x = realRadius * cos(topAngle * radians);
-	double y = (!yflip) ? scale * height : -scale * height;
-	double z = realRadius * sin(topAngle * radians);
+	float height = (float)(sin(sideAngle * radians));
+	float realRadius = (float)(scale * cos(sideAngle * radians));
+	float x = (float)(realRadius * cos(topAngle * radians));
+	float y = (!yflip) ? scale * height : -scale * height;
+	float z = (float)(realRadius * sin(topAngle * radians));
 	float timesRepeat = (4 * (256.0f / texw));
 	if (fpclassify(timesRepeat) == FP_ZERO)
 		timesRepeat = 1.0f;