1#ifndef __FRAMEBUFFER_H__
2#define __FRAMEBUFFER_H__
6#include "renderbuffer.h"
19 std::vector<GLenum> draw_buffers;
21 static int max_color_attachments;
41 EXPORT
void bind(GLenum target);
void finalize()
Sets the draw buffers to be drawn into.
bool attach_texture_layer(GLenum attachment, Texture &texture, unsigned int layer)
Attaches the layer of a texture to the framebuffer.
void blit_from_default(unsigned int src_x0, unsigned int src_y0, unsigned int src_x1, unsigned int src_y1, unsigned int dst_x0, unsigned int dst_y0, unsigned int dst_x1, unsigned int dst_y1, GLbitfield mask, GLenum filter)
Copies a block of pixels from the default framebuffer to this one.
void bind()
Binds the framebuffer to the target set in the constructor.
void blit_to(sgltk::Framebuffer *target, unsigned int src_x0, unsigned int src_y0, unsigned int src_x1, unsigned int src_y1, unsigned int dst_x0, unsigned int dst_y0, unsigned int dst_x1, unsigned int dst_y1, GLbitfield mask, GLenum filter)
Copies a block of pixels from this framebuffer to another one.
bool attach_renderbuffer(GLenum attachment, Renderbuffer &buffer)
Attaches a renderbuffer to the framebuffer.
Framebuffer(GLenum target=GL_FRAMEBUFFER)
bool attach_texture(GLenum attachment, Texture &texture)
Attaches a texture to the framebuffer.
GLenum get_buffer_status()
Checks the completeness status of the framebuffer.
void unbind()
Restores the original framebuffer as render target.