KoiKoi/src/Window.hpp

33 lines
526 B
C++
Raw Normal View History

2022-01-08 16:54:36 +01:00
#pragma once
#include <string>
2022-01-13 23:24:39 +01:00
#include <glad/glad.h>
2022-01-08 16:54:36 +01:00
#include <GLFW/glfw3.h>
2022-01-13 23:24:39 +01:00
#include <lol/lol.hpp>
struct UserData
{
lol::OrthogonalCamera* camera;
};
2022-01-08 16:54:36 +01:00
class Window
{
public:
Window(int width, int height, const std::string& title);
~Window();
inline bool IsValid() { return valid; }
inline bool ShouldClose() { return glfwWindowShouldClose(window); }
2022-01-13 23:24:39 +01:00
void Clear();
void Draw(lol::Drawable& drawable);
2022-01-08 16:54:36 +01:00
void Display();
private:
bool valid;
GLFWwindow* window;
2022-01-13 23:24:39 +01:00
UserData data;
lol::OrthogonalCamera camera;
2022-01-08 16:54:36 +01:00
};