mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
post-processing test
This commit is contained in:
parent
e7af5830cf
commit
8ed65ca51e
13 changed files with 268 additions and 113 deletions
|
|
@ -8,22 +8,35 @@
|
|||
class Texture;
|
||||
|
||||
class Framebuffer {
|
||||
uint fbo;
|
||||
uint depth;
|
||||
uint width;
|
||||
uint height;
|
||||
std::unique_ptr<Texture> texture;
|
||||
uint fbo;
|
||||
uint depth;
|
||||
uint width;
|
||||
uint height;
|
||||
uint format;
|
||||
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();
|
||||
Framebuffer(uint fbo, uint depth, std::unique_ptr<Texture> texture);
|
||||
Framebuffer(uint width, uint height, bool alpha=false);
|
||||
~Framebuffer();
|
||||
|
||||
void bind();
|
||||
void unbind();
|
||||
/// @brief Use framebuffer
|
||||
void bind();
|
||||
|
||||
Texture* getTexture() const;
|
||||
uint getWidth() const;
|
||||
uint getHeight() const;
|
||||
/// @brief Stop using framebuffer
|
||||
void unbind();
|
||||
|
||||
/// @brief Update framebuffer texture size
|
||||
/// @param width new width
|
||||
/// @param height new height
|
||||
void resize(uint width, uint height);
|
||||
|
||||
/// @brief Get framebuffer color attachment
|
||||
Texture* getTexture() const;
|
||||
|
||||
/// @brief Get framebuffer width
|
||||
uint getWidth() const;
|
||||
/// @brief Get framebuffer height
|
||||
uint getHeight() const;
|
||||
};
|
||||
|
||||
#endif /* SRC_GRAPHICS_FRAMEBUFFER_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue