ferx/engine/include/Window.h

47 lines
937 B
C
Raw Normal View History

#pragma once
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <string>
#include <iostream>
#include <Renderer.h>
2024-08-22 16:34:22 +00:00
struct WindowSize
{
int Width, Height;
WindowSize(): Width(0), Height(0){}
WindowSize(int width, int height): Width(width), Height(height){}
};
struct WindowData
{
std::string Title;
2024-08-22 16:34:22 +00:00
WindowSize Size;
2024-08-22 16:34:22 +00:00
WindowData(): Title("Ferx Engine"), Size(900, 600){}
WindowData(const std::string& title, int width, int height): Title(title), Size(width, height){};
};
class Window
{
public:
Window();
Window(const std::string& title, int width, int height);
~Window();
static Window Create();
static Window Create(const std::string& title, int width, int height);
void Init();
GLFWwindow* GetWindow() const;
const std::string& GetTitle() const;
2024-08-22 16:34:22 +00:00
WindowSize GetSize();
2024-08-22 16:34:22 +00:00
void Shutdown() const;
private:
GLFWwindow* m_Window{};
WindowData m_Data;
};