GL-related refactor

This commit is contained in:
MihailRis 2024-03-07 13:09:58 +03:00
parent f8e02e1b3b
commit 87edb1d45e
16 changed files with 224 additions and 111 deletions

View file

@ -3,20 +3,27 @@
#include "../typedefs.h"
#include <memory>
class Texture;
class Framebuffer {
uint fbo;
uint depth;
public:
uint width;
uint height;
Texture* texture;
std::unique_ptr<Texture> texture;
public:
Framebuffer(uint fbo, uint depth, std::unique_ptr<Texture> texture);
Framebuffer(uint width, uint height, bool alpha=false);
~Framebuffer();
void bind();
void unbind();
Texture* getTexture() const;
uint getWidth() const;
uint getHeight() const;
};
#endif /* SRC_GRAPHICS_FRAMEBUFFER_H_ */