Brenta Engine 1.1
|
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 () |
Bind the framebuffer. | |
void | unbind () |
Unbind the framebuffer. | |
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. | |
![]() | |
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 |
Itexture ID. | |
GLuint | render_buffer_id |
Render Buffer ID. | |
GLenum | format |
Format of the framebuffer Default is GL_RGBA. | |
![]() | |
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 contains the FrameBuffer functions, It's a wrapper around OpenGL FrameBuffers, providing functions to create, bind, unbind, delete and rescale the FrameBuffer.
Definition at line 45 of file frame_buffer.hpp.
|
inline |
Empty constructor Does nothing.
Definition at line 65 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 36 of file frame_buffer.cpp.
framebuffer::~framebuffer | ( | ) |
Destructor Deletes the framebuffer and its texture.
Definition at line 83 of file frame_buffer.cpp.
void framebuffer::bind | ( | ) |
Bind the framebuffer.
Definition at line 89 of file frame_buffer.cpp.
|
inline |
Definition at line 92 of file frame_buffer.hpp.
|
inline |
Definition at line 99 of file frame_buffer.hpp.
|
inline |
Definition at line 96 of file frame_buffer.hpp.
void framebuffer::destroy | ( | ) |
Delete the framebuffer and its texture.
Definition at line 101 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 107 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 137 of file frame_buffer.cpp.
void framebuffer::unbind | ( | ) |
Unbind the framebuffer.
Definition at line 95 of file frame_buffer.cpp.
GLenum brenta::types::framebuffer::format |
Format of the framebuffer Default is GL_RGBA.
Definition at line 60 of file frame_buffer.hpp.
GLuint brenta::types::framebuffer::render_buffer_id |
Render Buffer ID.
Definition at line 55 of file frame_buffer.hpp.
GLuint brenta::types::framebuffer::texture_id |
Itexture ID.
Definition at line 51 of file frame_buffer.hpp.