added rest of the openGL implementation theoreticaly the engine can render now

This commit is contained in:
2026-01-17 23:04:56 +01:00
parent 0f8c21278a
commit 551b790243
31 changed files with 1648 additions and 6 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
#include "buffer.hpp"
#include "interfaces/IResizable.hpp"
#include "Vector2.hpp"
namespace TSE::GLFW
{
class FrameBuffer : public buffer, public IResizable
{
private:
uint textureID = 0;
uint depthRboID = 0;
Vector2 size;
bool shouldResize = false;
public:
FrameBuffer(const Vector2& size);
void Bind() override;
void Unbind() override;
~FrameBuffer() override;
void Resize(Vector2 size);
void Update();
uint GetTextureId() const;
Vector2 GetSize() const;
private:
void Initialize();
void LoadFBTexture();
void CreateFBTexture();
};
} // namespace TSE