projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed:
[freeglut]
/
progs
/
demos
/
Fractals_random
/
fractals_random.c
diff --git
a/progs/demos/Fractals_random/fractals_random.c
b/progs/demos/Fractals_random/fractals_random.c
index
8992d1e
..
324f00b
100644
(file)
--- a/
progs/demos/Fractals_random/fractals_random.c
+++ b/
progs/demos/Fractals_random/fractals_random.c
@@
-74,7
+74,7
@@
static void
Display(void)
{
if (needClear) {
Display(void)
{
if (needClear) {
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glClear(GL_COLOR_BUFFER_BIT);
needClear = GL_FALSE;
}
needClear = GL_FALSE;
}
@@
-101,7
+101,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 ;
@@
-250,16
+253,16
@@
main(int argc, char *argv[])
{
int fractal_window ;
{
int fractal_window ;
- if ( argc > 1 )
- readConfigFile ( argv[1] ) ;
- else
- readConfigFile ( "fractals.dat" ) ;
+ glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE );
- glutInit(&argc, argv);
glutInitWindowSize(500, 250);
glutInitWindowPosition ( 140, 140 ) ;
glutInitWindowSize(500, 250);
glutInitWindowPosition ( 140, 140 ) ;
+ glutInit(&argc, argv);
- glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH);
+ if ( argc > 1 )
+ readConfigFile ( argv[1] ) ;
+ else
+ readConfigFile ( "fractals.dat" ) ;
fractal_window = glutCreateWindow( window_title );
fractal_window = glutCreateWindow( window_title );