Brenta Engine 1.1
Loading...
Searching...
No Matches
brenta::types::framebuffer Class Reference

FrameBuffer class. More...

#include <frame_buffer.hpp>

Inheritance diagram for brenta::types::framebuffer:
brenta::types::buffer

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.
 
- 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
 Itexture ID.
 
GLuint render_buffer_id
 Render Buffer ID.
 
GLenum format
 Format of the framebuffer 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...)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ framebuffer() [1/2]

brenta::types::framebuffer::framebuffer ( )
inline

Empty constructor Does nothing.

Definition at line 65 of file frame_buffer.hpp.

◆ framebuffer() [2/2]

framebuffer::framebuffer ( int width,
int height,
GLenum format = GL_RGBA )

Constructor Creates a framebuffer with a texture and a render buffer.

Parameters
widthWidth of the framebuffer
heightHeight of the framebuffer

Definition at line 36 of file frame_buffer.cpp.

◆ ~framebuffer()

framebuffer::~framebuffer ( )

Destructor Deletes the framebuffer and its texture.

Definition at line 83 of file frame_buffer.cpp.

Member Function Documentation

◆ bind()

void framebuffer::bind ( )

Bind the framebuffer.

Definition at line 89 of file frame_buffer.cpp.

◆ copy_data()

void brenta::types::framebuffer::copy_data ( GLsizeiptr size,
const void * data,
GLenum usage )
inline

Definition at line 92 of file frame_buffer.hpp.

◆ copy_indices()

void brenta::types::framebuffer::copy_indices ( GLsizeiptr size,
const void * data,
GLenum usage )
inline

Definition at line 99 of file frame_buffer.hpp.

◆ copy_vertices()

void brenta::types::framebuffer::copy_vertices ( GLsizeiptr size,
const void * data,
GLenum usage )
inline

Definition at line 96 of file frame_buffer.hpp.

◆ destroy()

void framebuffer::destroy ( )

Delete the framebuffer and its texture.

Definition at line 101 of file frame_buffer.cpp.

◆ rescale()

void framebuffer::rescale ( int width,
int height )

Rescale the framebuffer.

Parameters
widthNew width of the framebuffer
heightNew height of the framebuffer

Definition at line 107 of file frame_buffer.cpp.

◆ set_format()

void framebuffer::set_format ( GLenum format)

Set the format of the framebuffer.

Parameters
formatNew format of the framebuffer

Definition at line 137 of file frame_buffer.cpp.

◆ unbind()

void framebuffer::unbind ( )

Unbind the framebuffer.

Definition at line 95 of file frame_buffer.cpp.

Field Documentation

◆ format

GLenum brenta::types::framebuffer::format

Format of the framebuffer Default is GL_RGBA.

Definition at line 60 of file frame_buffer.hpp.

◆ render_buffer_id

GLuint brenta::types::framebuffer::render_buffer_id

Render Buffer ID.

Definition at line 55 of file frame_buffer.hpp.

◆ texture_id

GLuint brenta::types::framebuffer::texture_id

Itexture ID.

Definition at line 51 of file frame_buffer.hpp.


The documentation for this class was generated from the following files: