summaryrefslogtreecommitdiff
path: root/progs/wgl/wglthreads
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-06-16 12:29:14 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-06-16 12:29:58 +0100
commit06075711af7ae143c362a6d989121d8fdb4fd6ca (patch)
tree94f6429319bb6285d1c2bdec93ce3f6b35782c6c /progs/wgl/wglthreads
parent566bdbe67db04a9f94c1303bf41d1f453f7e72b2 (diff)
progs/wgl: Use appropriate types to silence msvc warnings.
Diffstat (limited to 'progs/wgl/wglthreads')
-rw-r--r--progs/wgl/wglthreads/wglthreads.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/progs/wgl/wglthreads/wglthreads.c b/progs/wgl/wglthreads/wglthreads.c
index 079fb47c82..4e53fa8dee 100644
--- a/progs/wgl/wglthreads/wglthreads.c
+++ b/progs/wgl/wglthreads/wglthreads.c
@@ -115,20 +115,20 @@ static void
MakeNewTexture(struct winthread *wt)
{
#define TEX_SIZE 128
- static float step = 0.0;
+ static float step = 0.0f;
GLfloat image[TEX_SIZE][TEX_SIZE][4];
GLint width;
int i, j;
for (j = 0; j < TEX_SIZE; j++) {
for (i = 0; i < TEX_SIZE; i++) {
- float dt = 5.0 * (j - 0.5 * TEX_SIZE) / TEX_SIZE;
- float ds = 5.0 * (i - 0.5 * TEX_SIZE) / TEX_SIZE;
+ float dt = 5.0f * (j - 0.5f * TEX_SIZE) / TEX_SIZE;
+ float ds = 5.0f * (i - 0.5f * TEX_SIZE) / TEX_SIZE;
float r = dt * dt + ds * ds + step;
image[j][i][0] =
image[j][i][1] =
- image[j][i][2] = 0.75 + 0.25 * cos(r);
- image[j][i][3] = 1.0;
+ image[j][i][2] = 0.75f + 0.25f * (float) cos(r);
+ image[j][i][3] = 1.0f;
}
}
@@ -160,7 +160,7 @@ static void
draw_object(void)
{
glPushMatrix();
- glScalef(0.75, 0.75, 0.75);
+ glScalef(0.75f, 0.75f, 0.75f);
glColor3f(1, 0, 0);
@@ -325,7 +325,7 @@ draw_loop(struct winthread *wt)
glPushMatrix();
glRotatef(wt->Angle, 0, 1, 0);
glRotatef(wt->Angle, 1, 0, 0);
- glScalef(0.7, 0.7, 0.7);
+ glScalef(0.7f, 0.7f, 0.7f);
draw_object();
glPopMatrix();