2022-04-20 19:40:35 +00:00
|
|
|
#pragma once
|
2022-04-30 20:51:50 +00:00
|
|
|
#define GLFW_STATIC
|
2022-05-27 20:47:36 +00:00
|
|
|
|
|
|
|
#include <glad/glad.h>
|
2022-04-20 19:40:35 +00:00
|
|
|
#include <GLFW/glfw3.h>
|
2022-06-10 20:44:40 +00:00
|
|
|
#include "../Include/EventSystem/EventListener.h"
|
2022-04-20 19:40:35 +00:00
|
|
|
|
|
|
|
|
2022-05-27 20:47:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-10 20:44:40 +00:00
|
|
|
class BarinkWindow : EventListener {
|
2022-04-20 19:40:35 +00:00
|
|
|
private:
|
|
|
|
GLFWwindow* window;
|
|
|
|
bool FullScreen;
|
|
|
|
bool VulkanSupported;
|
|
|
|
int Width, Height;
|
|
|
|
|
2022-04-30 18:20:07 +00:00
|
|
|
static bool InitGLFW();
|
2022-04-20 19:40:35 +00:00
|
|
|
|
|
|
|
|
2022-06-10 20:44:40 +00:00
|
|
|
|
|
|
|
|
2022-04-20 19:40:35 +00:00
|
|
|
public:
|
|
|
|
BarinkWindow(const int width, const int height);
|
|
|
|
~BarinkWindow();
|
|
|
|
|
2022-05-04 12:39:27 +00:00
|
|
|
GLFWwindow* windowptr();
|
|
|
|
|
2022-06-10 20:44:40 +00:00
|
|
|
void ReceiveEvent(Event& incident) override;
|
2022-04-28 19:02:54 +00:00
|
|
|
bool WindowShouldClose();
|
|
|
|
|
|
|
|
void Poll();
|
2022-05-04 12:39:27 +00:00
|
|
|
void SwapBuffers();
|
2022-04-20 19:40:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
};
|