diff --git a/src/window/Display.cpp b/src/window/Display.cpp index 1e41013..285298a 100644 --- a/src/window/Display.cpp +++ b/src/window/Display.cpp @@ -27,18 +27,7 @@ static int lastWidth = 0, lastHeight = 0; static float aspectRatio; void error_callback(int error, const char* description){ - fprintf(stderr, "Error: %s\n", description); -} - -void keyboard_event(GLFWwindow* window, int key, int scancode, int actions, int mods){ - std::cout << "Key : " << key << " " << scancode << " " << actions << " " << mods << std::endl; -} - -void mouseCursorEvent(GLFWwindow* window, double xPos, double yPos){ - static double lastX = xPos; - static double lastY = yPos; - lastX = xPos; - lastY = yPos; + std::cerr << "GLFW Error : " << description << std::endl; } void windowResizeEvent(GLFWwindow* window, int width, int height){ @@ -48,17 +37,6 @@ void windowResizeEvent(GLFWwindow* window, int width, int height){ lastHeight = height; } -void mouseScroll(GLFWwindow* window, double x, double y){ - -} - -void registerCallbacks(){ - glfwSetKeyCallback(window, &keyboard_event); - glfwSetCursorPosCallback(window, &mouseCursorEvent); - glfwSetWindowSizeCallback(window, &windowResizeEvent); - glfwSetScrollCallback(window, &mouseScroll); -} - void create() { glfwSetErrorCallback(&error_callback); glfwInit(); @@ -67,8 +45,6 @@ void create() { glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, true); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); window = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_NAME, nullptr, nullptr); - //glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); - //registerCallbacks(); glfwMakeContextCurrent(window); if(!td::render::Renderer::init()){ exit(1);