#pragma once
#include "basic.h"
#include "renderer.h"
#include "model.h"

struct Window {
    GLFWwindow* glfw_window = nullptr;
    Renderer* renderer = nullptr;
    Model* model = nullptr;
};

bool init_window(Window *window, u32 width, u32 height, string title);
void main_loop(Window *window);
void cleanup(Window *window);
void handle_close(GLFWwindow *gl_window);
void handle_key_events(GLFWwindow *gl_window, s32 key, s32 scancode, s32 action, s32 mods);
void handle_mouse_position_events(GLFWwindow *gl_window, f64 x_pos, f64 y_pos);
void handle_mouse_button_events(GLFWwindow *gl_window, s32 button, s32 action, s32 mods);
void handle_window_resize_events(GLFWwindow *gl_window, s32 width, s32 height);

