added basic glfw stuff

This commit is contained in:
2026-01-17 09:35:36 +01:00
parent c770c62400
commit a5b5bb0b49
12 changed files with 15323 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
#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() const override;
void ClearDepthBuffer() const override;
bool ShouldClose() const override;
inline void Bind() override { };
inline void Unbind() override { };
};
} // namespace TSE::GLFW