removed that backwards ass shit
This commit is contained in:
@@ -22,7 +22,6 @@ void Window::init(std::string title, int width, int height)
|
||||
setupGLFW(title);
|
||||
|
||||
glfwSetKeyCallback(getGLFWWindow(), glfwKeyCallback);
|
||||
glfwSetCursorPosCallback(getGLFWWindow(), glfwMouseCallback);
|
||||
|
||||
setupImGui();
|
||||
}
|
||||
@@ -66,21 +65,11 @@ void Window::setKeyCallback(KeyCallback callback)
|
||||
mKeyCallback = callback;
|
||||
}
|
||||
|
||||
void Window::setMouseCallback(MouseCallback callback)
|
||||
{
|
||||
mMouseCallback = callback;
|
||||
}
|
||||
|
||||
KeyCallback Window::getKeyCallback()
|
||||
{
|
||||
return mKeyCallback;
|
||||
}
|
||||
|
||||
MouseCallback Window::getMouseCallback()
|
||||
{
|
||||
return mMouseCallback;
|
||||
}
|
||||
|
||||
bool Window::newFrame()
|
||||
{
|
||||
glfwPollEvents();
|
||||
@@ -196,14 +185,6 @@ void Window::glfwKeyCallback(GLFWwindow* window, int key, int scancode, int acti
|
||||
}
|
||||
}
|
||||
|
||||
void Window::glfwMouseCallback(GLFWwindow* window, double xpos, double ypos)
|
||||
{
|
||||
if (Window::GetInstance().getMouseCallback() != nullptr)
|
||||
{
|
||||
Window::GetInstance().getMouseCallback()(xpos, ypos);
|
||||
}
|
||||
}
|
||||
|
||||
void Window::glfwErrorCallback(int error, const char* description) {
|
||||
spdlog::error("[GLFW {0}] {1}", error, description);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user