Functions for managing framebuffers and render targets. More...
Classes | |
struct | MSAA |
A structure to handle Multi-Sample Anti-Aliasing (MSAA) framebuffers. More... | |
struct | DFBO |
A structure to handle Deferred Frame Buffer Objects (DFBO). More... | |
struct | CFBO |
A structure to handle Complete Frame Buffer Objects (CFBO). More... | |
Typedefs | |
typedef unsigned int | FBO |
Alias for an unsigned int representing a Frame Buffer Object. | |
typedef FBO | FrameBuffer |
Alias for FBO, representing a Frame Buffer Object. | |
typedef unsigned int | RBO |
Alias for an unsigned int representing a Render Buffer Object. | |
Functions | |
void | swap_intermediate_fbo () |
Swaps the intermediate framebuffer. | |
TextureMap | get_intermediate_texture () |
Gets the last intermediate framebuffer texture. | |
void | use_intermediate_fbo () |
Sets the current framebuffer to an intermediate framebuffer. | |
void | create_intermediate_fbo () |
Creates two intermediate framebuffers. | |
void | free_intermediate_fbo () |
Frees the resources associated with the intermediate framebuffers. | |
void | resize_intermediate_fbo () |
Resizes the intermediate framebuffers. | |
void | use_fbo (GLenum mode, FBO fbo) |
Sets the current framebuffer. | |
FBO | get_fbo () |
Gets the current framebuffer. | |
void | create_dfbo (DFBO *dfbo) |
Creates a Deferred Frame Buffer Object (DFBO). | |
void | free_dfbo (DFBO *dfbo) |
Frees the resources associated with a DFBO. | |
void | resize_dfbo (DFBO *dfbo) |
Resizes a DFBO. | |
void | create_cfbo (CFBO *cFbo) |
Creates a CFBO (Complete Frame Buffer Object). | |
void | free_cfbo (CFBO *cFbo) |
Frees the resources associated with a CFBO. | |
void | resize_cfbo (CFBO *cFbo) |
Resizes a CFBO. | |
void | create_msaa (MSAA *msaa) |
Creates an MSAA framebuffer. | |
void | free_msaa (MSAA *msaa) |
Frees the resources associated with an MSAA framebuffer. | |
void | resize_msaa (MSAA *msaa) |
Resizes an MSAA framebuffer. | |
Functions for managing framebuffers and render targets.
void swap_intermediate_fbo | ( | ) |
Swaps the intermediate framebuffer.
This function swaps the current intermediate framebuffer with the next one. It is used for post-processing effects.
TextureMap get_intermediate_texture | ( | ) |
Gets the last intermediate framebuffer texture.
This function retrieves the last intermediate framebuffer texture. It is used for post-processing effects.
void use_intermediate_fbo | ( | ) |
Sets the current framebuffer to an intermediate framebuffer.
This function sets the current framebuffer to the intermediate framebuffer. It is used for post-processing effects.
void create_intermediate_fbo | ( | ) |
Creates two intermediate framebuffers.
This function initializes and sets up two intermediate framebuffers for post-processing effects. It is typically called during the initialization phase of the rendering pipeline.
void free_intermediate_fbo | ( | ) |
Frees the resources associated with the intermediate framebuffers.
This function deallocates and cleans up the resources used by the intermediate framebuffers. It should be called when the framebuffers are no longer needed to avoid memory leaks.
void resize_intermediate_fbo | ( | ) |
Resizes the intermediate framebuffers.
This function adjusts the size of the intermediate framebuffers to match new dimensions. It is useful when the window or viewport size changes and the framebuffers need to be updated accordingly.
void use_fbo | ( | GLenum | mode, |
FBO | fbo | ||
) |
Sets the current framebuffer.
This function sets the current framebuffer object to the specified framebuffer.
fbo | The framebuffer object to be set as the current framebuffer. |
mode | The mode to set the framebuffer to (GL_FRAMEBUFFER, GL_READ_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER). |
FBO get_fbo | ( | ) |
Gets the current framebuffer.
This function returns the current framebuffer object.
void create_dfbo | ( | DFBO * | dfbo | ) |
Creates a Deferred Frame Buffer Object (DFBO).
This function initializes and sets up a deferred framebuffer object. DFBOs are used for deferred rendering techniques, allowing for efficient rendering of complex scenes with multiple lights.
dfbo | A pointer to a DFBO structure that will hold the framebuffer information. |
void free_dfbo | ( | DFBO * | dfbo | ) |
void resize_dfbo | ( | DFBO * | dfbo | ) |
void create_cfbo | ( | CFBO * | cFbo | ) |
void free_cfbo | ( | CFBO * | cFbo | ) |
void resize_cfbo | ( | CFBO * | cFbo | ) |
void create_msaa | ( | MSAA * | msaa | ) |
Creates an MSAA framebuffer.
This function initializes and sets up a multisample anti-aliasing (MSAA) framebuffer. MSAA is used to improve the visual quality of rendered images by reducing aliasing.
msaa | A pointer to an MSAA structure that will hold the framebuffer information. |
void free_msaa | ( | MSAA * | msaa | ) |
Frees the resources associated with an MSAA framebuffer.
This function deallocates and cleans up the resources used by an MSAA framebuffer. It should be called when the framebuffer is no longer needed to avoid memory leaks.
msaa | A pointer to an MSAA structure that holds the framebuffer information to be freed. |
void resize_msaa | ( | MSAA * | msaa | ) |
Resizes an MSAA framebuffer.
This function adjusts the size of an existing MSAA framebuffer to match new dimensions. It is useful when the window or viewport size changes and the framebuffer needs to be updated accordingly.
msaa | A pointer to an MSAA structure that holds the framebuffer information to be resized. |