added basic glfw stuff
This commit is contained in:
40
TSE_GlfwImpl/src/WindowGlfw.hpp
Normal file
40
TSE_GlfwImpl/src/WindowGlfw.hpp
Normal 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
|
||||
Reference in New Issue
Block a user