rexim 4 lat temu
rodzic
commit
5e9e199956
2 zmienionych plików z 3 dodań i 0 usunięć
  1. 1 0
      README.md
  2. 2 0
      main.c

+ 1 - 0
README.md

@@ -6,6 +6,7 @@ Just a simple OpenGL template that I use on my streams.
 
 | Shortcut         | Description                                                                                                                                                               |
 |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| <kbd>q</kbd>    | Quit |
 | <kbd>F5</kbd>    | Reload [main.frag](./main.frag) and [main.vert](./main.vert) shaders. Red screen indicates a compilation or linking error, check the output of the program if you see it. |
 | <kbd>SPACE</kbd> | Pause/unpause the time uniform variable in shaders                                                                                                                        |
 | <kbd>←</kbd><kbd>→</kbd> | In pause mode step back/forth in time. |

+ 2 - 0
main.c

@@ -170,6 +170,8 @@ void key_callback(GLFWwindow* window, int key, int scancode, int action, int mod
             reload_shaders();
         } else if (key == GLFW_KEY_SPACE) {
             pause = !pause;
+        } else if (key == GLFW_KEY_Q) {
+            exit(1);
         }
 
         if (pause) {