1 | // GlutRTTAlap.cpp : Defines the entry point for the console application.
|
---|
2 | //
|
---|
3 |
|
---|
4 | #include "stdafx.h"
|
---|
5 | #include <random.h>
|
---|
6 | #include <stdio.h>
|
---|
7 | #include <My3DGraphRes\ThirdPersonCamera.h>
|
---|
8 |
|
---|
9 |
|
---|
10 | bool headsupdisplay=false;
|
---|
11 | bool showplane=true;
|
---|
12 | Scene theScene;
|
---|
13 | Scene thePlane;
|
---|
14 | Vector planeRotate;
|
---|
15 | Vector planePosition;
|
---|
16 | float planespeed=0;
|
---|
17 | float* transformmatrix=new float[16];
|
---|
18 | bool isrecording=false;
|
---|
19 | int framenum=0;
|
---|
20 | AdvancedParticleSystem theSystem;
|
---|
21 | //ThirdPersonCamera theCamera;
|
---|
22 | Camera theCamera;
|
---|
23 |
|
---|
24 | SkyBox theSkyBox;
|
---|
25 |
|
---|
26 | Vector LightPos(12,74,-33);
|
---|
27 | Vector LightColor(.85,.90,0.93);
|
---|
28 | float angle=0;
|
---|
29 |
|
---|
30 | unsigned int lastTime;
|
---|
31 | unsigned int frameRate=0;
|
---|
32 | unsigned int frameRateLast=0;
|
---|
33 | unsigned int timeElapsed;
|
---|
34 | unsigned int LastDtTime=0;
|
---|
35 | unsigned int Dt=0;
|
---|
36 | bool start=true;
|
---|
37 | int animtime=0;
|
---|
38 |
|
---|
39 | int x0=-1;
|
---|
40 | int y00=-1;
|
---|
41 |
|
---|
42 | char* rendermodes[]={"No shading","Single Scattering","Multiple Forward","Multiple Anisotropic" };
|
---|
43 |
|
---|
44 | Impostor ScreenQuad;
|
---|
45 | RenderTexture PhaseTexture;
|
---|
46 | CgProgram PhaseProgram;
|
---|
47 |
|
---|
48 | RenderTexture AngleTexture;
|
---|
49 | CgProgram AngleProgram;
|
---|
50 |
|
---|
51 | int displaytex=0;
|
---|
52 |
|
---|
53 | TransformAnimation cameraanim;
|
---|
54 | TransformAnimation planeanim;
|
---|
55 | bool animplaying=true;
|
---|
56 | int currentframe=0;
|
---|
57 | int framerate=30;//fps
|
---|
58 | float oneframeduration=1000.0f/30.0f;
|
---|
59 | float interpolationvalue=0;
|
---|
60 |
|
---|
61 | void drawFrameRate(char *str, void *font, GLclampf r, GLclampf g, GLclampf b,
|
---|
62 | GLfloat x, GLfloat y) {
|
---|
63 | /* font: font to use, e.g., GLUT_BITMAP_HELVETICA_10
|
---|
64 | r, g, b: text colour
|
---|
65 | x, y: text position in window: range [0,0] (bottom left of window)
|
---|
66 | to [1,1] (top right of window). */
|
---|
67 |
|
---|
68 | glDisable(GL_TEXTURE_2D);
|
---|
69 | char *ch;
|
---|
70 | GLint matrixMode;
|
---|
71 | GLboolean lightingOn;
|
---|
72 |
|
---|
73 | lightingOn= glIsEnabled(GL_LIGHTING); /* lighting on? */
|
---|
74 | if (lightingOn) glDisable(GL_LIGHTING);
|
---|
75 |
|
---|
76 | glGetIntegerv(GL_MATRIX_MODE, &matrixMode); /* matrix mode? */
|
---|
77 |
|
---|
78 | glMatrixMode(GL_PROJECTION);
|
---|
79 | glPushMatrix();
|
---|
80 | glLoadIdentity();
|
---|
81 | gluOrtho2D(0.0, 1.0, 0.0, 1.0);
|
---|
82 | glMatrixMode(GL_MODELVIEW);
|
---|
83 | glPushMatrix();
|
---|
84 | glLoadIdentity();
|
---|
85 | glPushAttrib(GL_COLOR_BUFFER_BIT); /* save current colour */
|
---|
86 | glColor4f(r, g, b,1);
|
---|
87 | glRasterPos3f(x, y, 0.0);
|
---|
88 | for(ch= str; *ch; ch++) {
|
---|
89 | glutBitmapCharacter(font, (int)*ch);
|
---|
90 | }
|
---|
91 | glPopAttrib();
|
---|
92 | glPopMatrix();
|
---|
93 | glMatrixMode(GL_PROJECTION);
|
---|
94 | glPopMatrix();
|
---|
95 | glMatrixMode(matrixMode);
|
---|
96 | if (lightingOn) glEnable(GL_LIGHTING);
|
---|
97 | glColor4f(1, 1, 1,1);
|
---|
98 | glEnable(GL_TEXTURE_2D);
|
---|
99 | }
|
---|
100 |
|
---|
101 | void calculateFrameRate()
|
---|
102 | {
|
---|
103 | unsigned int thisTime=(unsigned)timeGetTime();
|
---|
104 | timeElapsed=thisTime-lastTime;
|
---|
105 | Dt=thisTime-LastDtTime;
|
---|
106 | LastDtTime=thisTime;
|
---|
107 | frameRate++;
|
---|
108 | if(timeElapsed>1000)
|
---|
109 | {
|
---|
110 | lastTime=thisTime;
|
---|
111 | frameRateLast=frameRate;
|
---|
112 | frameRate=0;
|
---|
113 | }
|
---|
114 | if(animplaying)
|
---|
115 | {
|
---|
116 | //calculate animation
|
---|
117 | currentframe++;
|
---|
118 | if(currentframe==planeanim.framecount)
|
---|
119 | {
|
---|
120 | currentframe=0;
|
---|
121 | }
|
---|
122 | }
|
---|
123 | }
|
---|
124 |
|
---|
125 | void RenderPhaseTexture()
|
---|
126 | {
|
---|
127 | PhaseTexture.EnableTarget();
|
---|
128 | PhaseProgram.Enable();
|
---|
129 |
|
---|
130 | glClearColor(1,1,1,1);
|
---|
131 | glClear(GL_COLOR_BUFFER_BIT);
|
---|
132 |
|
---|
133 | glDisable(GL_DEPTH_TEST);
|
---|
134 | ScreenQuad.DisplayScreenQuad();
|
---|
135 | glEnable(GL_DEPTH_TEST);
|
---|
136 |
|
---|
137 | PhaseProgram.Disable();
|
---|
138 | PhaseTexture.DisableTarget();
|
---|
139 | PhaseTexture.BindColorBuffer();
|
---|
140 |
|
---|
141 | //angle texture
|
---|
142 |
|
---|
143 | AngleTexture.EnableTarget();
|
---|
144 | AngleProgram.Enable();
|
---|
145 |
|
---|
146 | glClearColor(1,1,1,1);
|
---|
147 | glClear(GL_COLOR_BUFFER_BIT);
|
---|
148 |
|
---|
149 | glDisable(GL_DEPTH_TEST);
|
---|
150 | ScreenQuad.DisplayScreenQuad();
|
---|
151 | glEnable(GL_DEPTH_TEST);
|
---|
152 |
|
---|
153 | AngleProgram.Disable();
|
---|
154 | AngleTexture.DisableTarget();
|
---|
155 | AngleTexture.BindColorBuffer();
|
---|
156 |
|
---|
157 |
|
---|
158 | }
|
---|
159 |
|
---|
160 | static void display()
|
---|
161 | {
|
---|
162 | calculateFrameRate();
|
---|
163 |
|
---|
164 | angle+=0.4;
|
---|
165 |
|
---|
166 | if(start)
|
---|
167 | {
|
---|
168 | Dt=0;timeElapsed=0;
|
---|
169 | start=false;
|
---|
170 | }
|
---|
171 | float x=cos(angle/180*3.14)*2.5;
|
---|
172 | float y=sin(angle/180*3.14)*2.5;
|
---|
173 |
|
---|
174 | theScene.m_Lights[0].m_Position=Vector(60,40,-80);
|
---|
175 | LightPos=theScene.m_Lights[0].m_Position;
|
---|
176 |
|
---|
177 | theSystem.m_LightColor=LightColor;
|
---|
178 |
|
---|
179 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
---|
180 |
|
---|
181 | theSkyBox.Display(theCamera);
|
---|
182 |
|
---|
183 | if(animplaying)
|
---|
184 | {
|
---|
185 | theCamera.m_Orientation=cameraanim.getRotate(currentframe);
|
---|
186 | theCamera.m_EyePosition=cameraanim.getTranslate(currentframe);
|
---|
187 | theCamera.SetViewandProjectionNew();
|
---|
188 | }
|
---|
189 | else
|
---|
190 | {
|
---|
191 | theCamera.SetViewandProjectionNew();
|
---|
192 | }
|
---|
193 |
|
---|
194 |
|
---|
195 | glPushMatrix();
|
---|
196 | //glTranslatef(0,-20,0);
|
---|
197 | glShadeModel(GL_SMOOTH);
|
---|
198 | //glScalef(1,1.5,1);
|
---|
199 | theScene.Display(true);
|
---|
200 | glShadeModel(GL_FLAT);
|
---|
201 | glPopMatrix();
|
---|
202 |
|
---|
203 |
|
---|
204 | if(showplane)
|
---|
205 | {
|
---|
206 | theSystem.theScene=&thePlane;
|
---|
207 | //if(animplaying)
|
---|
208 | //{
|
---|
209 | glMatrixMode(GL_MODELVIEW);
|
---|
210 | glPushMatrix();
|
---|
211 |
|
---|
212 | Vector trans=planeanim.getTranslate(currentframe);
|
---|
213 | glTranslatef(trans.x,trans.y,trans.z);
|
---|
214 |
|
---|
215 | Vector rot=planeanim.getRotate(currentframe);
|
---|
216 | glRotatef(rot.z,0,0,1);
|
---|
217 | glRotatef(rot.y,0,1,0);
|
---|
218 | glRotatef(rot.x,1,0,0);
|
---|
219 |
|
---|
220 |
|
---|
221 | // glMultMatrixf(planeanim.getMatrix(currentframe));
|
---|
222 | glGetFloatv(GL_MODELVIEW_MATRIX,transformmatrix);
|
---|
223 |
|
---|
224 | thePlane.Display(false);
|
---|
225 |
|
---|
226 | glPopMatrix();
|
---|
227 |
|
---|
228 | theSystem.setSceneTransformMatrix(transformmatrix);
|
---|
229 | /*}
|
---|
230 | else
|
---|
231 | {
|
---|
232 | glMatrixMode(GL_MODELVIEW);
|
---|
233 | glPushMatrix();
|
---|
234 | glLoadIdentity();
|
---|
235 |
|
---|
236 | //glLightfv(GL_LIGHT0,GL_POSITION,(LightPos-theCamera.getPosition()).GetArrayf());
|
---|
237 |
|
---|
238 | glTranslatef(0,-0.3,-(2+planespeed/2));
|
---|
239 | glRotatef(planeRotate.z,0,0,1);
|
---|
240 | glRotatef(planeRotate.x,1,0,0);
|
---|
241 | glRotatef(10,1,0,0);
|
---|
242 | glRotatef(180,0,1,0);
|
---|
243 | glGetFloatv(GL_MODELVIEW_MATRIX,transformmatrix);
|
---|
244 | thePlane.Display(false);
|
---|
245 | glPopMatrix();
|
---|
246 |
|
---|
247 | theSystem.setSceneTransformMatrix(transformmatrix);
|
---|
248 | }*/
|
---|
249 | }
|
---|
250 | else
|
---|
251 | {
|
---|
252 | theSystem.m_HasSceneTransformMatrix=false;
|
---|
253 | theSystem.theScene=&theScene;
|
---|
254 | }
|
---|
255 |
|
---|
256 | glEnable(GL_DEPTH_TEST);
|
---|
257 |
|
---|
258 | glDisable(GL_LIGHTING);
|
---|
259 | /*
|
---|
260 | //light
|
---|
261 | glPushMatrix();
|
---|
262 | glColor3f(1,0.7,0);
|
---|
263 | glTranslatef(LightPos.x,LightPos.y,LightPos.z);
|
---|
264 | glutSolidSphere(3,6,6);
|
---|
265 | glPopMatrix();
|
---|
266 | */
|
---|
267 | glDisable(GL_BLEND);
|
---|
268 |
|
---|
269 | theSystem.Refresh(&theCamera,LightPos,Dt,timeElapsed);
|
---|
270 |
|
---|
271 | theSystem.Display(&theCamera,LightPos);
|
---|
272 |
|
---|
273 | //theSystem.displayillum(&theCamera);
|
---|
274 | //theSystem.displaytexture(displaytex);
|
---|
275 |
|
---|
276 | char fr[255];
|
---|
277 | sprintf( fr,"FPS:%u Density: %f Albedo: %f Symmetry: %f Rendermode:%s",frameRateLast,theSystem.transparency,theSystem.albedo,theSystem.symmetry,rendermodes[theSystem.m_PSys_RenderMode]);
|
---|
278 | //sprintf( fr,"FPS:%u Density: %f Albedo: %f Symmetry: %f Rendermode:%i",frameRateLast,theSystem.transparency,theSystem.albedo,theSystem.symmetry,displaytex);
|
---|
279 |
|
---|
280 | if(headsupdisplay)
|
---|
281 | drawFrameRate(fr, GLUT_BITMAP_HELVETICA_10, 1.0f, 0.0f, 1.0f, 0.05, 0.95 );
|
---|
282 |
|
---|
283 | if(isrecording)
|
---|
284 | {
|
---|
285 | framenum++;
|
---|
286 | ilutGLScreenie();
|
---|
287 | char fname[25];
|
---|
288 | sprintf( fname,"smoke%i.tga",framenum);
|
---|
289 | rename("screen0.tga",fname);
|
---|
290 |
|
---|
291 | }
|
---|
292 |
|
---|
293 | glutSwapBuffers();
|
---|
294 |
|
---|
295 | glutReportErrors();
|
---|
296 | // glutPostRedisplay();
|
---|
297 | }
|
---|
298 |
|
---|
299 |
|
---|
300 | void idle()
|
---|
301 | {
|
---|
302 | glutPostRedisplay();
|
---|
303 | }
|
---|
304 |
|
---|
305 | void getExts(void)
|
---|
306 | {
|
---|
307 | if(! glh_init_extensions(
|
---|
308 | "GL_ARB_multitexture "
|
---|
309 | "WGL_ARB_pbuffer "
|
---|
310 | "WGL_ARB_pixel_format "
|
---|
311 | "WGL_ARB_render_texture "
|
---|
312 | "GL_NV_vertex_program "
|
---|
313 | "GL_NV_fragment_program "
|
---|
314 | // "GL_ARB_vertex_program "
|
---|
315 | // "GL_ARB_fragment_program "
|
---|
316 | // "WGL_NV_float_buffer"
|
---|
317 | "GL_ARB_vertex_buffer_object "
|
---|
318 | "GL_ATI_draw_buffers "
|
---|
319 | "GL_EXT_blend_equation_separate "
|
---|
320 | "GL_EXT_blend_minmax "
|
---|
321 | "GL_EXT_blend_func_separate "
|
---|
322 | "GL_EXT_blend_color "
|
---|
323 | //"GL_EXT_pixel_buffer_object "
|
---|
324 | )) {
|
---|
325 | fprintf(stderr, "Error - required extensions were not supported: %s", glh_get_unsupported_extensions());
|
---|
326 | exit(-1);
|
---|
327 | }
|
---|
328 | }
|
---|
329 |
|
---|
330 | void specialkey(int key, int x, int y)
|
---|
331 | {
|
---|
332 | switch(key)
|
---|
333 | {
|
---|
334 | case GLUT_KEY_LEFT:
|
---|
335 | theCamera.Rotate(AXIS_Y,1);
|
---|
336 | break;
|
---|
337 | case GLUT_KEY_RIGHT:
|
---|
338 | theCamera.Rotate(AXIS_Y,-1);
|
---|
339 | break;
|
---|
340 | case GLUT_KEY_UP:
|
---|
341 | theCamera.Rotate(AXIS_X,1);
|
---|
342 | break;
|
---|
343 | case GLUT_KEY_DOWN:
|
---|
344 | theCamera.Rotate(AXIS_X,-1);
|
---|
345 | break;
|
---|
346 |
|
---|
347 | case GLUT_KEY_F2:
|
---|
348 | if(glutGetModifiers())
|
---|
349 | theSystem.DecreaseAlbedo();
|
---|
350 | else
|
---|
351 | theSystem.IncreaseAlbedo();
|
---|
352 | break;
|
---|
353 | case GLUT_KEY_F1:
|
---|
354 | if(glutGetModifiers())
|
---|
355 | theSystem.DecreaseTransparency();
|
---|
356 | else
|
---|
357 | theSystem.IncreaseTransparency();
|
---|
358 | break;
|
---|
359 | case GLUT_KEY_F3:
|
---|
360 | if(glutGetModifiers())
|
---|
361 | theSystem.DecreaseSymmetry();
|
---|
362 | else
|
---|
363 | theSystem.IncreaseSymmetry();
|
---|
364 | break;
|
---|
365 |
|
---|
366 | }
|
---|
367 | }
|
---|
368 |
|
---|
369 | static void keyboard(unsigned char key, int x, int y)
|
---|
370 | {
|
---|
371 |
|
---|
372 | switch(key)
|
---|
373 | {
|
---|
374 | case 27:
|
---|
375 | exit(0);
|
---|
376 | break;
|
---|
377 |
|
---|
378 | case 'w':
|
---|
379 | theCamera.Move(AXIS_Z,0.5);
|
---|
380 | //planespeed+=0.35;
|
---|
381 |
|
---|
382 | break;
|
---|
383 | case 's':
|
---|
384 | theCamera.Move(AXIS_Z,-0.5);
|
---|
385 | //planespeed-=0.15;
|
---|
386 | break;
|
---|
387 | case 'd':
|
---|
388 | theCamera.Move(AXIS_X,0.5);
|
---|
389 | break;
|
---|
390 | case 'a':
|
---|
391 | theCamera.Move(AXIS_X,-0.5);
|
---|
392 | break;
|
---|
393 |
|
---|
394 | case 'r':
|
---|
395 | theCamera.Move(AXIS_Y,0.5);
|
---|
396 | break;
|
---|
397 | case 'f':
|
---|
398 | theCamera.Move(AXIS_Y,-0.5);
|
---|
399 | break;
|
---|
400 |
|
---|
401 | case 'm':
|
---|
402 | ilutGLScreenie();//screenshot
|
---|
403 | break;
|
---|
404 |
|
---|
405 | case 'i':
|
---|
406 | theSystem.depthcalc=!theSystem.depthcalc;
|
---|
407 | break;
|
---|
408 | case 'L':
|
---|
409 | theSystem.m_PSys_RenderMode--;
|
---|
410 | if(theSystem.m_PSys_RenderMode<0)theSystem.m_PSys_RenderMode=3;
|
---|
411 | break;
|
---|
412 | case 'l':
|
---|
413 | theSystem.m_PSys_RenderMode++;
|
---|
414 | if(theSystem.m_PSys_RenderMode>2)theSystem.m_PSys_RenderMode=0;
|
---|
415 | break;
|
---|
416 | case 'k':
|
---|
417 | displaytex++;
|
---|
418 | if(displaytex>2)displaytex=0;
|
---|
419 | break;
|
---|
420 |
|
---|
421 | case 'p':
|
---|
422 | isrecording=!isrecording;
|
---|
423 | break;
|
---|
424 | case 'o':
|
---|
425 | //if(!animplaying)currentframe=0;
|
---|
426 | animplaying=!animplaying;
|
---|
427 | break;
|
---|
428 |
|
---|
429 | case 'h':
|
---|
430 | headsupdisplay=!headsupdisplay;
|
---|
431 | break;
|
---|
432 |
|
---|
433 | case 'j':
|
---|
434 | showplane=!showplane;
|
---|
435 | break;
|
---|
436 |
|
---|
437 | }
|
---|
438 | }
|
---|
439 |
|
---|
440 | void mouseMove(int x, int y)
|
---|
441 | {
|
---|
442 | if(x0==-1)
|
---|
443 | {
|
---|
444 | x0=x;
|
---|
445 | y00=y;
|
---|
446 | }
|
---|
447 |
|
---|
448 | int dx=x-x0;
|
---|
449 | int dy=y-y00;
|
---|
450 |
|
---|
451 | theCamera.Rotate(Vector(0,((float)-dx)/10.0,0));
|
---|
452 | theCamera.Rotate(Vector(((float)-dy)/10.0,0,0));
|
---|
453 |
|
---|
454 | x0=x;
|
---|
455 | y00=y;
|
---|
456 | }
|
---|
457 | void mouseButton(int button, int state,int x, int y)
|
---|
458 | {
|
---|
459 | if(state==GLUT_UP)
|
---|
460 | {
|
---|
461 | x0=-1;
|
---|
462 | y00=-1;
|
---|
463 | }
|
---|
464 | }
|
---|
465 |
|
---|
466 |
|
---|
467 | void initOpenGL()
|
---|
468 | {
|
---|
469 | srand( (unsigned)timeGetTime() );
|
---|
470 |
|
---|
471 | glEnable(GL_DEPTH_TEST);
|
---|
472 | glClearDepth(1.0);
|
---|
473 | glClearColor(0,0,0, 0.0);
|
---|
474 | glEnable(GL_BLEND);
|
---|
475 |
|
---|
476 | getExts();
|
---|
477 |
|
---|
478 | theSystem.Initialize();
|
---|
479 | theSystem.m_BillboardTexture.setFilename("gradient.png");
|
---|
480 | //theSystem.m_BillboardTexture.setFilename("pamacs.dds");
|
---|
481 | theSystem.m_BillboardTexture.LoadImage();
|
---|
482 | theSystem.m_BbFrontDepthTexture.setFilename("2.dds");
|
---|
483 | theSystem.m_BbFrontDepthTexture.LoadImage();
|
---|
484 | theSystem.m_BbBackDepthTexture.setFilename("3.dds");
|
---|
485 | theSystem.m_BbBackDepthTexture.LoadImage();
|
---|
486 |
|
---|
487 | PhaseTexture.Initialize(256,256,"r float=16 textureRECT");
|
---|
488 | PhaseProgram.SetProgramFiles("PhaseFunction.cg","PhaseFunction.cg");
|
---|
489 | PhaseProgram.SetProgramEntries("VertexProgram","FragmentProgram");
|
---|
490 | PhaseProgram.InitPrograms();
|
---|
491 |
|
---|
492 | AngleTexture.Initialize(256,256,"r float=16 textureRECT");
|
---|
493 | AngleProgram.SetProgramFiles("Angle.cg","Angle.cg");
|
---|
494 | AngleProgram.SetProgramEntries("VertexProgram","FragmentProgram");
|
---|
495 | AngleProgram.InitPrograms();
|
---|
496 |
|
---|
497 | theCamera.setFarClipDistance(300);
|
---|
498 | theCamera.setFovX(54.43);
|
---|
499 |
|
---|
500 |
|
---|
501 | RenderPhaseTexture();
|
---|
502 | theSystem.PhaseTexID=PhaseTexture.getColorTextureID();
|
---|
503 | theSystem.AngleTexID=AngleTexture.getColorTextureID();
|
---|
504 |
|
---|
505 | theSkyBox.Initialize("greydream");
|
---|
506 |
|
---|
507 | theScene.Load("hegyek.txt");
|
---|
508 | thePlane.Load("plane3.txt");
|
---|
509 |
|
---|
510 | cameraanim.Load("cameraanim.txt");
|
---|
511 | planeanim.Load("planeanim.txt");
|
---|
512 | }
|
---|
513 |
|
---|
514 | int _tmain(int argc, _TCHAR* argv[])
|
---|
515 | {
|
---|
516 | glutInit(&argc, argv);
|
---|
517 | ilInit();
|
---|
518 | iluInit();
|
---|
519 | ilutRenderer(ILUT_OPENGL);
|
---|
520 |
|
---|
521 | glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
|
---|
522 | glutInitWindowSize(512, 512);
|
---|
523 | glutCreateWindow("GlutRTTAlap");
|
---|
524 |
|
---|
525 | initOpenGL();
|
---|
526 |
|
---|
527 | glutSpecialFunc(specialkey);
|
---|
528 | glutKeyboardFunc(keyboard);
|
---|
529 | glutMotionFunc(mouseMove);
|
---|
530 | glutMouseFunc(mouseButton);
|
---|
531 | glutDisplayFunc(display);
|
---|
532 |
|
---|
533 | glutIdleFunc(idle);
|
---|
534 |
|
---|
535 | glutMainLoop();
|
---|
536 |
|
---|
537 | return 0;
|
---|
538 | }
|
---|
539 |
|
---|