|
Brenta Engine 1.2
|
FrameBuffer class. More...
#include <frame_buffer.hpp>
Public Member Functions | |
| framebuffer () | |
| Empty constructor Does nothing. | |
| framebuffer (int width, int height, GLenum format=GL_RGBA) | |
| Constructor Creates a framebuffer with a texture and a render buffer. | |
| ~framebuffer () | |
| Destructor Deletes the framebuffer and its texture. | |
| void | bind () |
| void | unbind () |
| void | destroy () |
| Delete the framebuffer and its texture. | |
| void | copy_data (GLsizeiptr size, const void *data, GLenum usage) |
| void | copy_vertices (GLsizeiptr size, const void *data, GLenum usage) |
| void | copy_indices (GLsizeiptr size, const void *data, GLenum usage) |
| void | rescale (int width, int height) |
| Rescale the framebuffer. | |
| void | set_format (GLenum format) |
| Set the format of the framebuffer. | |
Public Member Functions inherited from brenta::types::buffer | |
| buffer () | |
| Default constructor, does nothing. | |
| buffer (GLenum input_target) | |
| Constructor that creates a buffer object. | |
| void | bind () |
| Bind the buffer object. | |
| void | unbind () |
| Unbind the buffer object. | |
| void | destroy () |
| Delete the buffer object. | |
| int | get_id () |
| Get the buffer object id. | |
| GLenum | get_target () |
| Get the buffer object target. | |
| void | set_id (unsigned int id) |
| Set the buffer object id. | |
| void | set_target (GLenum target) |
| Set the buffer object target. | |
| void | copy_data (GLsizeiptr size, const void *data, GLenum usage) |
| Copy data to the buffer object. | |
| void | copy_vertices (GLsizeiptr size, const void *data, GLenum usage) |
| Copy data to the buffer object. | |
| void | copy_indices (GLsizeiptr size, const void *data, GLenum usage) |
| Copy data to the buffer object. | |
Data Fields | |
| GLuint | texture_id |
| GLuint | render_buffer_id |
| GLenum | format |
| Color format of the frame buffer Default is GL_RGBA. | |
Data Fields inherited from brenta::types::buffer | |
| unsigned int | id |
| Buffer object id, generated by OpenGL. | |
| GLenum | target |
| Buffer object target (like GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER...) | |
FrameBuffer class.
This class is a wrapper around OpenGL frame buffers, providing functions to create, bind, unbind, delete and rescale the frame buffer.
Definition at line 24 of file frame_buffer.hpp.
|
inline |
Empty constructor Does nothing.
Definition at line 38 of file frame_buffer.hpp.
| framebuffer::framebuffer | ( | int | width, |
| int | height, | ||
| GLenum | format = GL_RGBA ) |
Constructor Creates a framebuffer with a texture and a render buffer.
| width | Width of the framebuffer |
| height | Height of the framebuffer |
Definition at line 16 of file frame_buffer.cpp.
| framebuffer::~framebuffer | ( | ) |
Destructor Deletes the framebuffer and its texture.
Definition at line 63 of file frame_buffer.cpp.
| void framebuffer::bind | ( | ) |
Definition at line 69 of file frame_buffer.cpp.
|
inline |
Definition at line 60 of file frame_buffer.hpp.
|
inline |
Definition at line 73 of file frame_buffer.hpp.
|
inline |
Definition at line 67 of file frame_buffer.hpp.
| void framebuffer::destroy | ( | ) |
Delete the framebuffer and its texture.
Definition at line 81 of file frame_buffer.cpp.
| void framebuffer::rescale | ( | int | width, |
| int | height ) |
Rescale the framebuffer.
| width | New width of the framebuffer |
| height | New height of the framebuffer |
Definition at line 87 of file frame_buffer.cpp.
| void framebuffer::set_format | ( | GLenum | format | ) |
Set the format of the framebuffer.
| format | New format of the framebuffer |
Definition at line 116 of file frame_buffer.cpp.
| void framebuffer::unbind | ( | ) |
Definition at line 75 of file frame_buffer.cpp.
| GLenum brenta::types::framebuffer::format |
Color format of the frame buffer Default is GL_RGBA.
Definition at line 33 of file frame_buffer.hpp.
| GLuint brenta::types::framebuffer::render_buffer_id |
Definition at line 28 of file frame_buffer.hpp.
| GLuint brenta::types::framebuffer::texture_id |
Definition at line 27 of file frame_buffer.hpp.