Skip to content

Commit eee5fe0

Browse files
authored
Update mandel.cpp
added f11 key
1 parent 7c28928 commit eee5fe0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mandel.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void key(unsigned char key, int x, int y) {
5858
maxIter2 = maxIter;std::cout << "Maximum iterations: " << maxIter << "\n";render = true;
5959
if(maxIter>1000000){maxIter=1000000;}glutPostRedisplay();break;}
6060

61-
case 'b': {biomorph=!biomorph;biomorphVal=1;glutPostRedisplay();break;}
61+
case 'b': {biomorph=!biomorph;glutPostRedisplay();break;}
6262
case '[': {if(biomorph){biomorphVal-=0.1;}render=true;glutPostRedisplay();break;}
6363
case ']': {if(biomorph){biomorphVal+=0.1;}render=true;glutPostRedisplay();break;}
6464
case 'o': {bailout/=1.1;render=true;glutPostRedisplay();break;}
@@ -70,6 +70,7 @@ void key(unsigned char key, int x, int y) {
7070
case '2': {fractal=2;std::cout << "-Burning Ship-\n";bailout=16; glutPostRedisplay();break;}
7171
case '1': {fractal=1;std::cout << "Mandelbrot Set\n";bailout=16; glutPostRedisplay();break;}
7272
case 'r': {reset();break;}
73+
case 'f': {fullscreen=!fullscreen;if(fullscreen){oWIDTH=WIDTH;oHEIGHT=HEIGHT;glutFullScreen();}else{glutReshapeWindow(oWIDTH,oHEIGHT);}break;}
7374
case 'j': {if(julia&&frame>oFrame+8){julia=false;}else{julia=true;xJul=xPos+mouseX/zoom;
7475
yJul=yPos+(HEIGHT-mouseY)/zoom;}oFrame=frame;glutPostRedisplay();break;}
7576
}
@@ -226,7 +227,6 @@ void idle(){
226227
}
227228
void specialfunc(int key, int x, int y){
228229
switch(key){
229-
case GLUT_KEY_F11: {fullscreen=!fullscreen;if(fullscreen){oWIDTH=WIDTH;oHEIGHT=HEIGHT;glutFullScreen();}else{glutReshapeWindow(oWIDTH,oHEIGHT);}break;}
230230
case GLUT_KEY_UP:{
231231
yPos+=40/zoom;glutPostRedisplay();break;}
232232
case GLUT_KEY_DOWN:{
@@ -235,6 +235,7 @@ void specialfunc(int key, int x, int y){
235235
xPos+=40/zoom;glutPostRedisplay();break;}
236236
case GLUT_KEY_LEFT:{
237237
xPos-=40/zoom;glutPostRedisplay();break;}
238+
case GLUT_KEY_F11: {fullscreen=!fullscreen;if(fullscreen){oWIDTH=WIDTH;oHEIGHT=HEIGHT;glutFullScreen();}else{glutReshapeWindow(oWIDTH,oHEIGHT);}break;}
238239
}
239240
}
240241
int main(int argc, char** argv){

0 commit comments

Comments
 (0)