#pragma once

#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <stdio.h>
#include <string.h>
#include "math.h"

struct Window {
  u32 width = 1024, height = 768;
  s32 buffer_width = 0, buffer_height = 0;
  GLFWwindow *gl_window = nullptr;
  bool ascii_keys[1024] = {false};

  // Camera coords
  f32 last_x_position = 0.0f;
  f32 last_y_position = 0.0f;
  f32 x_change_position = 0.0f;
  f32 y_change_position = 0.0f;
  bool first_mouse_movement = true;

  ~Window();
};

bool setup_window(Window *window);
void handle_keys(GLFWwindow *gl_window, int key, int code, int action, int mode);
void handle_mouse(GLFWwindow *gl_window, f64 x_position, f64 y_position);
