mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
GL-related refactor
This commit is contained in:
parent
f8e02e1b3b
commit
87edb1d45e
16 changed files with 224 additions and 111 deletions
|
|
@ -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_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue