bonsoir,
dans mon programme opengl c++, j'ai une voiture qui roule sur une route mais alors je la fais rouler d'un pas de 0.1 et au lieu qu'il roule d'une facon continu elle roule discret comme si elle fait des pas (surement c'est probleme de memoire ) puis elle reste de bouger apres un certain nombre de pas meme si la boucle est pour l'infini
je sais pas pourquoi
voila le code de main (il reste un .h qui contient des fonctions): je souhaite que vous me detectez le probleme :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
 
#include "stdafx.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <Windows.h>
#include <GL/glut.h>
#include "drawing_functions.h"
#include "SOIL.h"
//#include "glm.h"
//#include "drawmodel.h"
//#include "glm.c"
 
 
/* l'heure systeme
 
	SYSTEMTIME Time;
    
    GetLocalTime(&Time);
    
    printf("Nous sommes le : %02d/%02d/%04d.\n",
    Time.wDay, Time.wMonth, Time.wYear);
 
    printf("Et il est : %02dh %02dmn %02ds %03dms.\n",
    Time.wHour, Time.wMinute, Time.wSecond, Time.wMilliseconds);
 
*/
float yy = 1.8;
GLuint	texture[2];	
int LoadGLTextures()									// Load Bitmaps And Convert To Textures
{
	/* load an image file directly as a new OpenGL texture */
	texture[0] = SOIL_load_OGL_texture(	"facmodif.bmp",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[1] = SOIL_load_OGL_texture(	"vert2.bmp",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[2] = SOIL_load_OGL_texture(	"arriere.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[3] = SOIL_load_OGL_texture(	"couleur.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[4] = SOIL_load_OGL_texture(	"vitre.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[5] = SOIL_load_OGL_texture(	"parebrise.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[6] = SOIL_load_OGL_texture(	"terrain.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[7] = SOIL_load_OGL_texture(	"mur.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[8] = SOIL_load_OGL_texture(	"facade.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[9] = SOIL_load_OGL_texture(	"facade2.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[10] = SOIL_load_OGL_texture("zlij.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[11] = SOIL_load_OGL_texture("porte.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[12] = SOIL_load_OGL_texture("marbre.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[13] = SOIL_load_OGL_texture("trotoir1.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[14] = SOIL_load_OGL_texture("mur_deniere.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	texture[15] = SOIL_load_OGL_texture("sol.png",SOIL_LOAD_AUTO,SOIL_CREATE_NEW_ID,SOIL_FLAG_INVERT_Y);
	//if(texture[0] == 0)
		//return false;
 
 
	//Typical Texture Generation Using Data From The Bitmap
	//glBindTexture(GL_TEXTURE_2D, texture[0]);
	//glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
	//glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
 
	return true;										// Return Success
}
 
 
 
static void key(unsigned char k, int x, int y)
{
  switch (k) {
  case 27:  //Echaper
    exit(0);
    break;
  default:
    return;
  }
  glutPostRedisplay();
}
void Dessiner()
{
 
	//for(;;){
 
		//yy = yy -0.1 ;
 
	/*
	*/
	glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
    glMatrixMode( GL_MODELVIEW );
    glLoadIdentity( );
 
    gluLookAt(5.5,6.5,7,0,0,0,0,0,1);
 
	//drawRectangle3D(1.15,1.15,0.1,1.55,1.15,0.1,1.55,7,0.1,1.15,7,0.1);
	LoadGLTextures();
 
	//glColor3ub(255,255,255);
 
	glBindTexture(GL_TEXTURE_2D, texture[6]);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);        
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
	glMatrixMode(GL_TEXTURE);
	glLoadIdentity();
	//glScalef(2,2,2);
	glEnable(GL_TEXTURE_2D);
	glColor3ub(0,255,0);
	glBegin(GL_QUADS);
		glTexCoord2i(0,0);	glVertex3d(1.55,1.55,0.1);
		glTexCoord2i(20,0);	glVertex3d(1.15,6,0);
		glTexCoord2i(20,20);	glVertex3d(6,6,0);
		glTexCoord2i(0,20);	glVertex3d(6,1.15,0);
	glEnd();
 
	glDisable(GL_TEXTURE_2D);
	glMatrixMode( GL_MODELVIEW );
    //glLoadIdentity( );
 
	glColor3ub(63,63,63);
	drawRectangle(1,6,-1,6,-1,-19,1,-19,0.01); // route horizontale
	drawRectangle(6,1,6,-1,-12,-1,-12,1,0.011); // route verticale
	glColor3f(1,1,1);
	drawRectangle(0.99,1.1,0.7,1.1,0.7,1.6,0.99,1.6,0.11);//les places des pietons de la route vers la droite 
	drawRectangle(0.64,1.1,0.4,1.1,0.4,1.6,0.64,1.6,0.11);
	drawRectangle(0.34,1.1,0.1,1.1,0.1,1.6,0.34,1.6,0.11);
	drawRectangle(0.04,1.1,-0.2,1.1,-0.2,1.6,0.04,1.6,0.11);
	drawRectangle(-0.26,1.1,-0.5,1.1,-0.5,1.6,-0.26,1.6,0.11);
	drawRectangle(-0.56,1.1,-0.84,1.1,-0.84,1.6,-0.56,1.6,0.11);
 
	drawRectangle(0.99,-1.1,0.7,-1.1,0.7,-1.6,0.99,-1.6,0.11);//les places des pietons de la route vers la gauche 
	drawRectangle(0.64,-1.1,0.4,-1.1,0.4,-1.6,0.64,-1.6,0.11);
	drawRectangle(0.34,-1.1,0.1,-1.1,0.1,-1.6,0.34,-1.6,0.11);
	drawRectangle(0.04,-1.1,-0.2,-1.1,-0.2,-1.6,0.04,-1.6,0.11);
	drawRectangle(-0.26,-1.1,-0.5,-1.1,-0.5,-1.6,-0.26,-1.6,0.11);
	drawRectangle(-0.56,-1.1,-0.84,-1.1,-0.84,-1.6,-0.56,-1.6,0.11);
 
	drawRectangle(-1.1,0.99,-1.1,0.7,-1.6,0.7,-1.6,0.99,0.11);//les places des pietons de la route vers la haut 
	drawRectangle(-1.1,0.64,-1.1,0.4,-1.6,0.4,-1.6,0.64,0.11);
	drawRectangle(-1.1,0.34,-1.1,0.1,-1.6,0.1,-1.6,0.34,0.11);
	drawRectangle(-1.1,0.04,-1.1,-0.2,-1.6,-0.2,-1.6,0.04,0.11);
	drawRectangle(-1.1,-0.26,-1.1,-0.5,-1.6,-0.5,-1.6,-0.26,0.11);
	drawRectangle(-1.1,-0.56,-1.1,-0.84,-1.6,-0.84,-1.6,-0.56,0.11);
 
	drawRectangle(1.1,0.99,1.1,0.7,1.6,0.7,1.6,0.99,0.11);//les places des pietons de la route vers la bas 
	drawRectangle(1.1,0.64,1.1,0.4,1.6,0.4,1.6,0.64,0.11);
	drawRectangle(1.1,0.34,1.1,0.1,1.6,0.1,1.6,0.34,0.11);
	drawRectangle(1.1,0.04,1.1,-0.2,1.6,-0.2,1.6,0.04,0.11);
	drawRectangle(1.1,-0.26,1.1,-0.5,1.6,-0.5,1.6,-0.26,0.11);
	drawRectangle(1.1,-0.56,1.1,-0.84,1.6,-0.84,1.6,-0.56,0.11);
 
	int j ;
	for(j=0;j<15;j++){
	drawRectangle(0.04,1.8+j,-0.04,1.8+j,-0.04,2.4+j,0.04,2.4+j,0.11);//les rectangles au milieu du route droite
	drawRectangle(0.04,-1.8-j,-0.04,-1.8-j,-0.04,-2.4-j,0.04,-2.4-j,0.11);//les rectangles au milieu du route gauche
	drawRectangle(1.8+j,0.04,1.8+j,-0.04,2.4+j,-0.04,2.4+j,0.04,0.11);//les rectangles au milieu du route bas
	drawRectangle(-1.8-j,0.04,-1.8-j,-0.04,-2.4-j,-0.04,-2.4-j,0.04,0.11);//les rectangles au milieu du route haut
	}
 
	float i,y=1;
 
	for(i = 1;i<25;i++){
	glColor3ub(255,0,0);
	drawRectangle3D(-1,y,0,-1,y+0.3,0,-1,y+0.3,0.1,-1,y,0.1);// les trotoires du route droite vers (haut) rouge
	drawRectangle3D(-1,y,0.1,-1,y+0.3,0.1,-1.15,y+0.3,0.1,-1.15,y,0.1);
 
	//if(y>4 || y<2.5){// pour l'entrée du terrain
	drawRectangle3D(1,y,0,1,y+0.3,0,1,y+0.3,0.1,1,y,0.1);// les trotoires du route droite vers (bas) rouge
	drawRectangle3D(1,y,0.1,1,y+0.3,0.1,1.15,y+0.3,0.1,1.15,y,0.1);
	//}
 
	drawRectangle3D(-y,-1,0,-y-0.3,-1,0,-y-0.3,-1,0.1,-y,-1,0.1);// les trotoires du route haut vers (gauche) rouge
	drawRectangle3D(-y,-1,0.1,-y-0.3,-1,0.1,-y-0.3,-1.15,0.1,-y,-1.15,0.1);
 
	drawRectangle3D(-y,1,0,-y-0.3,1,0,-y-0.3,1,0.1,-y,1,0.1);// les trotoires du route haut vers (droite) rouge
	drawRectangle3D(-y,1,0.1,-y-0.3,1,0.1,-y-0.3,1.15,0.1,-y,1.15,0.1);
 
	drawRectangle3D(y,-1,0,y+0.3,-1,0,y+0.3,-1,0.1,y,-1,0.1);// les trotoires du route bas vers (gauche) rouge
	drawRectangle3D(y,-1,0.1,y+0.3,-1,0.1,y+0.3,-1.15,0.1,y,-1.15,0.1);
 
	drawRectangle3D(y,1,0,y+0.3,1,0,y+0.3,1,0.1,y,1,0.1);// les trotoires du route bas vers (droite) rouge
	drawRectangle3D(y,1,0.1,y+0.3,1,0.1,y+0.3,1.15,0.1,y,1.15,0.1);
 
	drawRectangle3D(-1,-y,0,-1,-y-0.3,0,-1,-y-0.3,0.1,-1,-y,0.1);// les trotoires du route gauche (vres haut)
	drawRectangle3D(-1,-y,0.1,-1,-y-0.3,0.1,-1.15,-y-0.3,0.1,-1.15,-y,0.1);
 
	drawRectangle3D(1,-y,0,1,-y-0.3,0,1,-y-0.3,0.1,1,-y,0.1);// les trotoires du route gauche (vres bas)
	drawRectangle3D(1,-y,0.1,1,-y-0.3,0.1,1.15,-y-0.3,0.1,1.15,-y,0.1);
 
	y= y +0.3;
 
	glColor3ub(255,255,255);
	drawRectangle3D(-1,y,0,-1,y+0.3,0,-1,y+0.3,0.1,-1,y,0.1);// les trotoires du route droite vers (haut) blanc
	drawRectangle3D(-1,y,0.1,-1,y+0.3,0.1,-1.15,y+0.3,0.1,-1.15,y,0.1);
 
	//if(y>4 || y<2.5){// pour l'entrée du terrain
	drawRectangle3D(1,y,0,1,y+0.3,0,1,y+0.3,0.1,1,y,0.1);// les trotoires du route droite vers (bas) blanc
	drawRectangle3D(1,y,0.1,1,y+0.3,0.1,1.15,y+0.3,0.1,1.15,y,0.1);
	//}
 
 
	drawRectangle3D(-1,-y,0,-1,-y-0.3,0,-1,-y-0.3,0.1,-1,-y,0.1);// les trotoires du route gauche vers (haut) blanc
	drawRectangle3D(-1,-y,0.1,-1,-y-0.3,0.1,-1.15,-y-0.3,0.1,-1.15,-y,0.1);
 
	drawRectangle3D(1,-y,0,1,-y-0.3,0,1,-y-0.3,0.1,1,-y,0.1);// les trotoires du route gauche vers (bas) blanc
	drawRectangle3D(1,-y,0.1,1,-y-0.3,0.1,1.15,-y-0.3,0.1,1.15,-y,0.1);
 
	drawRectangle3D(-y,-1,0,-y-0.3,-1,0,-y-0.3,-1,0.1,-y,-1,0.1);// les trotoires du route haut vers (gauche) blanc
	drawRectangle3D(-y,-1,0.1,-y-0.3,-1,0.1,-y-0.3,-1.15,0.1,-y,-1.15,0.1);
 
	drawRectangle3D(-y,1,0,-y-0.3,1,0,-y-0.3,1,0.1,-y,1,0.1);// les trotoires du route haut vers (droite) blanc
	drawRectangle3D(-y,1,0.1,-y-0.3,1,0.1,-y-0.3,1.15,0.1,-y,1.15,0.1);
 
	drawRectangle3D(y,-1,0,y+0.3,-1,0,y+0.3,-1,0.1,y,-1,0.1);// les trotoires du route bas vers (gauche) blanc
	drawRectangle3D(y,-1,0.1,y+0.3,-1,0.1,y+0.3,-1.15,0.1,y,-1.15,0.1);
 
	drawRectangle3D(y,1,0,y+0.3,1,0,y+0.3,1,0.1,y,1,0.1);// les trotoires du route bas vers (droite) blanc
	drawRectangle3D(y,1,0.1,y+0.3,1,0.1,y+0.3,1.15,0.1,y,1.15,0.1);
 
	y= y +0.3;
	}
	// trotoir droit bas
	glColor3ub(130,130,130);
	drawRectangle3DTexture(texture,1.15,1.15,0.1,1.55,1.15,0.1,1.55,7,0.1,1.15,7,0.1);
	drawRectangle3DTexture(texture,1.55,1.15,0.1,1.55,1.55,0.1,7,1.55,0.1,7,1.15,0.1);
	//trotoir droit haut
	drawRectangle3DTexture(texture,-1.15,1.15,0.1,-1.55,1.15,0.1,-1.55,7,0.1,-1.15,7,0.1);
	drawRectangle3DTexture(texture,-1.55,1.15,0.1,-1.55,1.55,0.1,-7,1.55,0.1,-7,1.15,0.1);
	//trotoir devant usine
	drawRectangle3DTexture(texture,-1.15,-1.15,0.1,-1.55,-1.15,0.1,-1.55,-17,0.1,-1.15,-17,0.1);
	drawRectangle3DTexture(texture,-1.55,-1.15,0.1,-1.55,-1.55,0.1,-17,-1.55,0.1,-17,-1.15,0.1);
	//trotoir devant devant usine
	drawRectangle3DTexture(texture,1.15,-1.15,0.1,1.55,-1.15,0.1,1.55,-7,0.1,1.15,-7,0.1);
	drawRectangle3DTexture(texture,1.55,-1.15,0.1,1.55,-1.55,0.1,7,-1.55,0.1,7,-1.15,0.1);
	//mur droit haut
	/*
	*/
	mur_villa(texture);
	dernier_batiment(texture);
	/*
	* le mur de l'immeuble et son image
	*/  
	glColor3ub(255,255,255);
 
	glBindTexture(GL_TEXTURE_2D, texture[0]);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);        
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
	glMatrixMode(GL_TEXTURE);
	glLoadIdentity();
	//glScalef(2,2,2);
	glEnable(GL_TEXTURE_2D);
	glBegin (GL_QUADS);
   glTexCoord2i(0,0);	glVertex3f (-1.55,1.55,0.1);
   glTexCoord2i(1,0);	glVertex3f (-1.55,7,0.1);
   glTexCoord2i(1,1);	glVertex3f (-1.55,7,2);
   glTexCoord2i(0,1);	glVertex3f (-1.55,1.55,2);
   glEnd ();
 
   glMatrixMode(GL_MODELVIEW);// les autres murs du meme immeuble
	drawRectangle3D(-1.55,1.55,0.1,-1.55,7,0.1,-1.55,7,2,-1.55,1.55,2);
	drawRectangle3D(-1.55,1.55,0.1,-7,1.55,0.1,-7,1.55,2,-1.55,1.55,2);
	drawRectangle3D(-1.55,1.55,2,-7,1.55,2,-7,7,2,-1.55,7,2);//plafon
	/*-------- le feu rouge  a cote du mur
	*/
	GLUquadric* params = gluNewQuadric();
	glPushMatrix();
	glTranslated(-1.24,1.52,0);				// changement repere
    glColor3ub(155,155,155);
	gluCylinder(params,0.05,0.05,1.1,20,1);
    glTranslated(0,0,0.47);					// changement repere
	glColor3ub(255,0,0);
 
	// la texture et le feu tricolore
 
	glColor3ub(255,255,255);
 
	glBindTexture(GL_TEXTURE_2D, texture[1]);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);        
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
	glMatrixMode(GL_TEXTURE);
	glEnable(GL_TEXTURE_2D);
	glBegin (GL_QUADS);
   glTexCoord2i(0,0);	glVertex3f (0.11,0.11,0);
   glTexCoord2i(1,0);	glVertex3f (-0.11,0.11,0);
   glTexCoord2i(1,1);	glVertex3f (-0.11,0.11,0.7);
   glTexCoord2i(0,1);	glVertex3f (0.11,0.11,0.7);
   glEnd ();
   glDisable(GL_TEXTURE_2D);
	//gluDeleteQuadric(params);
 
	glMatrixMode(GL_MODELVIEW);
	glPopMatrix();
	/*
	*/ //le deuxieme feu tricolore
	glPushMatrix();
	glTranslated(-1.66,-1.27,0);				// changement repere
    glColor3ub(42,42,42);
	gluCylinder(params,0.05,0.05,1.1,20,1);
    glTranslated(0,0,0.47);					// changement repere
	glBegin (GL_QUADS);
  /* glTexCoord2i(0,1);*/	glVertex3f (-0.11,-0.11,0);
   /*glTexCoord2i(1,1);*/	glVertex3f (-0.11,0.11,0);
   /*glTexCoord2i(1,0);*/	glVertex3f (-0.11,0.11,0.7);
   /*glTexCoord2i(0,0);*/	glVertex3f (-0.11,-0.11,0.7);
   glEnd ();
   glDisable(GL_TEXTURE_2D);
	//gluDeleteQuadric(params);
	glMatrixMode(GL_MODELVIEW);
	glPopMatrix();
	/*
	*/ //le troisieme feu tricolore
	glPushMatrix();
	glTranslated(+1.27,-1.53,0);				// changement repere
    glColor3ub(42,42,42);
	gluCylinder(params,0.05,0.05,1.1,20,1);
    glTranslated(0,0,0.47);					// changement repere
	glBegin (GL_QUADS);
  /* glTexCoord2i(0,1);*/	glVertex3f (0.11,-0.11,0);
   /*glTexCoord2i(1,1);*/	glVertex3f (-0.11,-0.11,0);
   /*glTexCoord2i(1,0);*/	glVertex3f (-0.11,-0.11,0.7);
   /*glTexCoord2i(0,0);*/	glVertex3f (0.11,-0.11,0.7);
   glEnd ();
   glDisable(GL_TEXTURE_2D);
	//gluDeleteQuadric(params);
	glMatrixMode(GL_MODELVIEW);
	glPopMatrix();
	/*
	*/ //le quatrieme feu tricolore
	glPushMatrix();
	glTranslated(+1.59,+1.3,0);				// changement repere
    glColor3ub(42,42,42);
	gluCylinder(params,0.05,0.05,1.1,20,1);
    glTranslated(0,0,0.47);					// changement repere
 
	glBindTexture(GL_TEXTURE_2D, texture[1]);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);        
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
	glMatrixMode(GL_TEXTURE);
	glEnable(GL_TEXTURE_2D);
	glColor3ub(255,255,255);
	glBegin (GL_QUADS);
   glTexCoord2i(0,0);	glVertex3f (0.11,-0.11,0);
  glTexCoord2i(1,0);	glVertex3f (0.11,0.11,0);
  glTexCoord2i(1,1);	glVertex3f (0.11,0.11,0.7);
  glTexCoord2i(0,1);	glVertex3f (0.11,-0.11,0.7);
   glEnd ();
   glDisable(GL_TEXTURE_2D);
	gluDeleteQuadric(params);
	glMatrixMode(GL_MODELVIEW);
	glPopMatrix();
	/*
	*/
	drawVoiturealler(texture,yy);
	//glFlush();
	glutSwapBuffers();
	/*
	*/
	/*GetLocalTime(&Time);
	differ_time = Time.wMilliseconds - current_time;
	if (differ_time < 4 & differ_time > 0)
        {
            Sleep(4 - differ_time);
        }
	// - --	-	-	-	-	-	-	-	
		*/
	//}
	/*
	*/
 
	//
 
}
void Idle(){
yy = yy -0.1;
glutPostRedisplay();
}
int main(int argc, char** argv)
{
 
	glutInit(&argc, argv);
	glutInitDisplayMode(  GLUT_RGBA | GLUT_DOUBLE |GLUT_DEPTH );
	glutInitWindowSize(1000,590);
	glutInitWindowPosition(50,50);
 
	glutCreateWindow("fenetre OpenGl");
 
	glMatrixMode( GL_PROJECTION );
    glLoadIdentity();
 
	gluPerspective(40,(double)640/480,1,100);
    glEnable(GL_DEPTH_TEST);
 
	glutDisplayFunc(Dessiner);
	glutIdleFunc(Idle);
 
 
	//Dessiner();
	glutKeyboardFunc(key);
	glutMainLoop();
	return 0;
}
merci