projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding the "subwin" demo to the MSVC 6.0 workspace, in both static and dynamic config...
[freeglut]
/
progs
/
demos
/
Fractals
/
fractals.c
diff --git
a/progs/demos/Fractals/fractals.c
b/progs/demos/Fractals/fractals.c
index
0852f1a
..
12d8989
100644
(file)
--- a/
progs/demos/Fractals/fractals.c
+++ b/
progs/demos/Fractals/fractals.c
@@
-33,12
+33,15
@@
typedef struct
AffineTrans ;
/* Number of levels to draw the fractal */
AffineTrans ;
/* Number of levels to draw the fractal */
-static int num_levels = 0 ;
+static int num_levels = 4 ;
/* The definition of the fractal */
static int num_trans ;
static AffineTrans *affine ;
/* The definition of the fractal */
static int num_trans ;
static AffineTrans *affine ;
+/* Flag telling us to keep executing the main loop */
+static int continue_in_main_loop = 1;
+
/* the window title */
char window_title [ 80 ] ;
/* the window title */
char window_title [ 80 ] ;
@@
-125,7
+128,7
@@
Key(unsigned char key, int x, int y)
switch (key) {
case 27: /* Escape key */
switch (key) {
case 27: /* Escape key */
- glutLeaveMainLoop () ;
+ continue_in_main_loop = 0 ;
break;
case '+' :
break;
case '+' :
@@
-321,7
+324,11
@@
main(int argc, char *argv[])
glutSpecialFunc(Special);
glutDisplayFunc(Display);
glutSpecialFunc(Special);
glutDisplayFunc(Display);
- glutMainLoop();
+#ifdef WIN32
+#endif
+
+ while ( continue_in_main_loop )
+ glutMainLoopEvent();
printf ( "Back from the 'freeglut' main loop\n" ) ;
printf ( "Back from the 'freeglut' main loop\n" ) ;