Changes to the Fractals demo by John Fay

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@128 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
puggles 2003-07-10 11:49:12 +00:00
parent d583f2fe7d
commit 7b1de376d7
2 changed files with 34 additions and 34 deletions

View File

@ -49,7 +49,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../freeglut_static___Win32_Release" # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /libpath:"../../../ReleaseStatic"
!ELSEIF "$(CFG)" == "Fractals - Win32 Debug" !ELSEIF "$(CFG)" == "Fractals - Win32 Debug"
@ -73,7 +73,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../freeglut_static___Win32_Debug" # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"../../../DebugStatic"
!ENDIF !ENDIF

View File

@ -42,8 +42,8 @@ static AffineTrans *affine ;
char window_title [ 80 ] ; char window_title [ 80 ] ;
/* The amount the view is translated and scaled */ /* The amount the view is translated and scaled */
float xwin = 0.0, ywin = 0.0 ; double xwin = 0.0, ywin = 0.0 ;
float scale_factor = 1.0 ; double scale_factor = 1.0 ;
static void draw_level ( int num, double m00, double m01, double m10, double m11, double n0, double n1 ) static void draw_level ( int num, double m00, double m01, double m10, double m11, double n0, double n1 )
{ {
@ -60,8 +60,8 @@ static void draw_level ( int num, double m00, double m01, double m10, double m11
double x1 = m00 * affine[i].statx + m01 * affine[i].staty + n0 ; double x1 = m00 * affine[i].statx + m01 * affine[i].staty + n0 ;
double y1 = m10 * affine[i].statx + m11 * affine[i].staty + n1 ; double y1 = m10 * affine[i].statx + m11 * affine[i].staty + n1 ;
glVertex2f ( x0, y0 ) ; glVertex2d ( x0, y0 ) ;
glVertex2f ( x1, y1 ) ; glVertex2d ( x1, y1 ) ;
x0 = x1 ; x0 = x1 ;
y0 = y1 ; y0 = y1 ;
@ -111,7 +111,7 @@ Reshape(int width, int height)
glLoadIdentity () ; glLoadIdentity () ;
xwin = -1.0 ; xwin = -1.0 ;
ywin = 0.0 ; ywin = 0.0 ;
glTranslatef(xwin, ywin, -5.0); glTranslated ( xwin, ywin, -5.0 ) ;
} }
static void static void
@ -136,7 +136,7 @@ Key(unsigned char key, int x, int y)
glLoadIdentity(); glLoadIdentity();
xwin = -1.0 ; xwin = -1.0 ;
ywin = 0.0 ; ywin = 0.0 ;
glTranslatef(xwin, ywin, -5.0); glTranslated ( xwin, ywin, -5.0 ) ;
break ; break ;
} }
@ -151,40 +151,40 @@ Special(int key, int x, int y)
case GLUT_KEY_UP : case GLUT_KEY_UP :
glMatrixMode ( GL_MODELVIEW ) ; glMatrixMode ( GL_MODELVIEW ) ;
ywin += 0.1 * scale_factor ; ywin += 0.1 * scale_factor ;
glTranslatef(0.0, 0.1 * scale_factor, 0.0); glTranslated ( 0.0, 0.1 * scale_factor, 0.0 ) ;
break ; break ;
case GLUT_KEY_DOWN : case GLUT_KEY_DOWN :
glMatrixMode ( GL_MODELVIEW ) ; glMatrixMode ( GL_MODELVIEW ) ;
ywin -= 0.1 * scale_factor ; ywin -= 0.1 * scale_factor ;
glTranslatef(0.0, -0.1 * scale_factor, 0.0); glTranslated ( 0.0, -0.1 * scale_factor, 0.0 ) ;
break ; break ;
case GLUT_KEY_LEFT : case GLUT_KEY_LEFT :
glMatrixMode ( GL_MODELVIEW ) ; glMatrixMode ( GL_MODELVIEW ) ;
xwin -= 0.1 * scale_factor ; xwin -= 0.1 * scale_factor ;
glTranslatef(-0.1 * scale_factor, 0.0, 0.0); glTranslated ( -0.1 * scale_factor, 0.0, 0.0 ) ;
break ; break ;
case GLUT_KEY_RIGHT : case GLUT_KEY_RIGHT :
glMatrixMode ( GL_MODELVIEW ) ; glMatrixMode ( GL_MODELVIEW ) ;
xwin += 0.1 * scale_factor ; xwin += 0.1 * scale_factor ;
glTranslatef(0.1 * scale_factor, 0.0, 0.0); glTranslated ( 0.1 * scale_factor, 0.0, 0.0 ) ;
break ; break ;
case GLUT_KEY_PAGE_UP : case GLUT_KEY_PAGE_UP :
glMatrixMode ( GL_MODELVIEW ) ; glMatrixMode ( GL_MODELVIEW ) ;
glTranslatef ( -xwin, -ywin, 0.0 ) ; glTranslated ( -xwin, -ywin, 0.0 ) ;
glScalef(1.25, 1.25, 1.25); glScaled ( 1.25, 1.25, 1.25 ) ;
glTranslatef ( xwin, ywin, 0.0 ) ; glTranslated ( xwin, ywin, 0.0 ) ;
scale_factor *= 0.8 ; scale_factor *= 0.8 ;
break ; break ;
case GLUT_KEY_PAGE_DOWN : case GLUT_KEY_PAGE_DOWN :
glMatrixMode ( GL_MODELVIEW ) ; glMatrixMode ( GL_MODELVIEW ) ;
glTranslatef ( -xwin, -ywin, 0.0 ) ; glTranslated ( -xwin, -ywin, 0.0 ) ;
glScalef(0.8, 0.8, 0.8); glScaled ( 0.8, 0.8, 0.8 ) ;
glTranslatef ( xwin, ywin, 0.0 ) ; glTranslated ( xwin, ywin, 0.0 ) ;
scale_factor *= 1.25 ; scale_factor *= 1.25 ;
break ; break ;
} }