#include "window.h" Window::Window(){ std::cout<<"Start"<update(difference); m_core->draw(); glfwSwapBuffers(m_GLFWwindow); } } void Window::end(){ glfwDestroyWindow(m_GLFWwindow); glfwTerminate(); exit(EXIT_SUCCESS); } void Window::keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods){ if(key == GLFW_KEY_ESCAPE){ glfwSetWindowShouldClose(window, true); } Core* ptr = (Core*)glfwGetWindowUserPointer(window); ptr->keyEvent(key, action); } void Window::cursorPosCallback(GLFWwindow* window, double xpos, double ypos){ Core* ptr = (Core*)glfwGetWindowUserPointer(window); ptr->mousePosEvent(xpos, ypos); } void Window::mouseButtonCallback(GLFWwindow* window, int button, int action, int mods){ Core* ptr = (Core*)glfwGetWindowUserPointer(window); ptr->mouseButtonEvent(button, action); } void Window::scrollCallback(GLFWwindow* window, double xoffset, double yoffset){ Core* ptr = (Core*)glfwGetWindowUserPointer(window); ptr->scrollEvent(yoffset); } void Window::windowSizeCallback(GLFWwindow* window, int width, int height){ Core* ptr = (Core*)glfwGetWindowUserPointer(window); ptr->windowResizeEvent(width, height); } void Window::framebufferSizeCallback(GLFWwindow* window, int width, int height){ Core* ptr = (Core*)glfwGetWindowUserPointer(window); ptr->framebufferResizeEvent(width, height); }