removed unused functions in Display.cpp
This commit is contained in:
@@ -27,18 +27,7 @@ static int lastWidth = 0, lastHeight = 0;
|
|||||||
static float aspectRatio;
|
static float aspectRatio;
|
||||||
|
|
||||||
void error_callback(int error, const char* description){
|
void error_callback(int error, const char* description){
|
||||||
fprintf(stderr, "Error: %s\n", description);
|
std::cerr << "GLFW Error : " << description << std::endl;
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void windowResizeEvent(GLFWwindow* window, int width, int height){
|
void windowResizeEvent(GLFWwindow* window, int width, int height){
|
||||||
@@ -48,17 +37,6 @@ void windowResizeEvent(GLFWwindow* window, int width, int height){
|
|||||||
lastHeight = 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() {
|
void create() {
|
||||||
glfwSetErrorCallback(&error_callback);
|
glfwSetErrorCallback(&error_callback);
|
||||||
glfwInit();
|
glfwInit();
|
||||||
@@ -67,8 +45,6 @@ void create() {
|
|||||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, true);
|
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, true);
|
||||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||||
window = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_NAME, nullptr, nullptr);
|
window = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_NAME, nullptr, nullptr);
|
||||||
//glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
|
|
||||||
//registerCallbacks();
|
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
if(!td::render::Renderer::init()){
|
if(!td::render::Renderer::init()){
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user