projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A few minor changes:
[freeglut]
/
progs
/
demos
/
Fractals
/
fractals.c
diff --git
a/progs/demos/Fractals/fractals.c
b/progs/demos/Fractals/fractals.c
index
3749f16
..
ee00245
100644
(file)
--- a/
progs/demos/Fractals/fractals.c
+++ b/
progs/demos/Fractals/fractals.c
@@
-83,7
+83,7
@@
static void draw_level ( int num, double m00, double m01, double m10, double m11
static void
Display(void)
{
static void
Display(void)
{
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glClear( GL_COLOR_BUFFER_BIT );
/* the curve */
glPushMatrix();
/* the curve */
glPushMatrix();
@@
-106,7
+106,10
@@
Reshape(int width, int height)
glMatrixMode ( GL_PROJECTION ) ;
glLoadIdentity();
ar = (float) width / (float) height ;
glMatrixMode ( GL_PROJECTION ) ;
glLoadIdentity();
ar = (float) width / (float) height ;
- glFrustum ( -ar, ar, -1.0, 1.0, 2.0, 100.0 ) ;
+ if( ar > 1 )
+ glFrustum ( -ar, ar, -1.0, 1.0, 2.0, 100.0 ) ;
+ else
+ glFrustum ( -1.0, 1.0, -1/ar, 1/ar, 2.0, 100.0 );
glMatrixMode ( GL_MODELVIEW ) ;
glLoadIdentity () ;
xwin = -1.0 ;
glMatrixMode ( GL_MODELVIEW ) ;
glLoadIdentity () ;
xwin = -1.0 ;
@@
-259,17
+262,16
@@
main(int argc, char *argv[])
{
int fractal_window ;
{
int fractal_window ;
+ glutInitWindowSize(500, 250);
+ glutInitWindowPosition ( 140, 140 );
+ glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE );
+ glutInit(&argc, argv);
+
if ( argc > 1 )
readConfigFile ( argv[1] ) ;
else
readConfigFile ( "fractals.dat" ) ;
if ( argc > 1 )
readConfigFile ( argv[1] ) ;
else
readConfigFile ( "fractals.dat" ) ;
- glutInit(&argc, argv);
- glutInitWindowSize(500, 250);
- glutInitWindowPosition ( 140, 140 ) ;
-
- glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
-
fractal_window = glutCreateWindow( window_title );
glClearColor(1.0, 1.0, 1.0, 1.0);
fractal_window = glutCreateWindow( window_title );
glClearColor(1.0, 1.0, 1.0, 1.0);