41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "GLFW/glfw3.h"
|
|
#include "Types.hpp"
|
|
#include "interfaces/IWindow.hpp"
|
|
#include "interfaces/IRenderingBackend.hpp"
|
|
#include "enums/WindowType.hpp"
|
|
#include "Color.hpp"
|
|
|
|
|
|
namespace TSE::GLFW
|
|
{
|
|
class WindowGlfw : public IWindow
|
|
{
|
|
private:
|
|
IRenderingBackend* renderingBackend;
|
|
|
|
public:
|
|
GLFWwindow* window;
|
|
WindowType windowType;
|
|
bool useImGui = false;
|
|
|
|
WindowGlfw(string _title, int _width, int _height, IRenderingBackend* backend);
|
|
WindowGlfw(string _title, int _width, int _height, IRenderingBackend* backend, TSE::WindowType type);
|
|
WindowGlfw(string _title, int _width, int _height, IRenderingBackend* backend, TSE::WindowType type, int ppu);
|
|
~WindowGlfw();
|
|
|
|
protected:
|
|
bool Init() override;
|
|
static void ResizeWindow(GLFWwindow* wnd, int width, int height);
|
|
|
|
public:
|
|
void Clear() const override;
|
|
void Update() override;
|
|
void ClearDepthBuffer() const override;
|
|
bool ShouldClose() const override;
|
|
inline void Bind() override { };
|
|
inline void Unbind() override { };
|
|
};
|
|
} // namespace TSE::GLFW
|