2 * Copyright 2020 Iwo 'Outfrost' Bujkiewicz
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
16 static void (*keyboardInputCallback) (int, int, int, int);
20 void onKeyboardEvent(GLFWwindow* window UNUSED, int key, int scancode, int action, int mods) {
21 if (!(mods & GLFW_MOD_CONTROL)) {
22 if (keyboardInputCallback) {
23 keyboardInputCallback(key, scancode, action, mods);
30 if (action == GLFW_PRESS) {
31 debugScene = !debugScene;
35 if (action == GLFW_PRESS) {
36 debugRender = !debugRender;
44 void setKeyboardInputCallback(void (*callback) (int, int, int, int)) {
45 keyboardInputCallback = callback;