8#ifndef GALAXY_GRAPHICS_GL_FRAMEBUFFER_HPP_
9#define GALAXY_GRAPHICS_GL_FRAMEBUFFER_HPP_
113 void clear(
const unsigned int index);
150 unsigned int id()
const;
Represents an RGBA colour.
OpenGL framebuffer to render to.
std::array< float, 4 > m_clear_colour
Clear colour.
unsigned int m_renderbuffer
Renderbuffer attachment.
unsigned int m_id
OpenGL handle.
void clear_storagebuffer(const int val)
Clear storagebuffer.
unsigned int m_storageattach
Storage attachment id.
void add_colour_attachment(const int width, const int height)
Add a colour attachment to the framebuffer.
void add_depth_stencil_renderbuffer()
Adds a depth and stencil supported renderbuffer to the framebuffer.
void reset()
Completely delete objects.
int width() const
Get width.
int height() const
Get height.
unsigned int id() const
Get OpenGL framebuffer object.
unsigned int texture() const
Get colour attachment texture id.
void create()
Construct framebuffer from attachments and renderbuffers.
Framebuffer & operator=(Framebuffer &&)
Move assignment operator.
int read_storagebuffer(const int x, const int y)
Read storage buffer.
unsigned int m_colour
Colour attachment id.
~Framebuffer()
Destructor.
void end()
Unbind framebuffer.
int m_height
Height cache.
void add_storage_attachment()
Add an attachment to store an integer.
Framebuffer(const Framebuffer &)=delete
Copy constructor.
void clear()
Clear framebuffer attachments.
Framebuffer()
Constructor.
void begin(const bool clear=true)
Bind framebuffer for rendering to.
void set_clear_colour(const graphics::Colour &col)
Set clear colour.
Framebuffer & operator=(const Framebuffer &)=delete
Copy assignment operator.