removed unused functions in Display.cpp

This commit is contained in:
2021-08-21 13:51:20 +02:00
parent 1b5fd2f66f
commit 2ed590d065

View File

@@ -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);