lots of code for mesh management rendering and window input

This commit is contained in:
Ben Kyd
2022-10-25 17:59:22 +01:00
parent 0bdbd96c67
commit ec69a90b29
13 changed files with 359 additions and 32 deletions

View File

@@ -2,13 +2,17 @@
#include "spdlog/spdlog.h"
using namespace core;
using namespace inferno;
Window::Window(std::string title, int width, int height)
{
this->width = width;
this->height = height;
setupGLFW(title);
glfwSetKeyCallback(getGLFWWindow(), glfwKeyCallback);
glfwSetCursorPosCallback(getGLFWWindow(), glfwMouseCallback);
setupImGui();
}
@@ -147,6 +151,16 @@ void Window::shutdownGLFW()
glfwTerminate();
}
void Window::glfwKeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods)
{
}
void Window::glfwMouseCallback(GLFWwindow* window, double xpos, double ypos)
{
}
void Window::glfwErrorCallback(int error, const char* description) {
spdlog::error("[GLFW {0}] {1}", error, description);
}