test rendering ui to texture

This commit is contained in:
MihailRis 2026-02-03 23:13:07 +03:00
parent 5d5a0e8932
commit 566aa04cda
6 changed files with 80 additions and 1 deletions

View file

@ -13,7 +13,7 @@ class Framebuffer : public Bindable {
uint width;
uint height;
uint format;
std::unique_ptr<Texture> texture;
std::shared_ptr<Texture> texture;
public:
Framebuffer(uint fbo, uint depth, std::unique_ptr<Texture> texture);
Framebuffer(uint width, uint height, bool alpha=false);
@ -33,6 +33,8 @@ public:
/// @brief Get framebuffer color attachment
Texture* getTexture() const;
std::shared_ptr<Texture> getSharedTexture() const;
/// @brief Get framebuffer width
uint getWidth() const;
/// @brief Get framebuffer height