Claude Chappe' Curse - A C Game
Logo Institut d'Informatique Claude Chappe Logo Université de Le Mans Logo Raeptor Production
 
Loading...
Searching...
No Matches
Framebuffer Management

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.
 

Detailed Description

Functions for managing framebuffers and render targets.

Typedef Documentation

◆ FBO

FBO

Alias for an unsigned int representing a Frame Buffer Object.

◆ FrameBuffer

Alias for FBO, representing a Frame Buffer Object.

◆ RBO

RBO

Alias for an unsigned int representing a Render Buffer Object.

Function Documentation

◆ swap_intermediate_fbo()

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.

Note
This function is typically called after rendering to the main framebuffer and before applying post-processing effects.

◆ get_intermediate_texture()

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.

Returns
The last intermediate framebuffer texture.
Note
This function is typically called after rendering to the main framebuffer and before applying post-processing effects.

◆ use_intermediate_fbo()

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.

Note
This function is typically called after rendering to the main framebuffer and before applying post-processing effects.

◆ create_intermediate_fbo()

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.

Note
This function should be called before rendering to the main framebuffer.

◆ free_intermediate_fbo()

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.

Note
This function should be called during the cleanup phase of the rendering pipeline.

◆ resize_intermediate_fbo()

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.

Note
This function should be called when the window or viewport size changes.

◆ use_fbo()

void use_fbo ( GLenum  mode,
FBO  fbo 
)

Sets the current framebuffer.

This function sets the current framebuffer object to the specified framebuffer.

Parameters
fboThe framebuffer object to be set as the current framebuffer.
modeThe mode to set the framebuffer to (GL_FRAMEBUFFER, GL_READ_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER).

◆ get_fbo()

FBO get_fbo ( )

Gets the current framebuffer.

This function returns the current framebuffer object.

◆ create_dfbo()

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.

Parameters
dfboA pointer to a DFBO structure that will hold the framebuffer information.

◆ free_dfbo()

void free_dfbo ( DFBO dfbo)

Frees the resources associated with a DFBO.

This function deallocates and cleans up the resources used by a DFBO. It should be called when the framebuffer is no longer needed to avoid memory leaks.

Parameters
dfboA pointer to a DFBO structure that holds the framebuffer information to be freed.

◆ resize_dfbo()

void resize_dfbo ( DFBO dfbo)

Resizes a DFBO.

This function adjusts the size of an existing DFBO to match new dimensions. It is useful when the window or viewport size changes and the framebuffer needs to be updated accordingly.

Parameters
dfboA pointer to a DFBO structure that holds the framebuffer information to be resized.

◆ create_cfbo()

void create_cfbo ( CFBO cFbo)

Creates a CFBO (Complete Frame Buffer Object).

This function initializes and sets up a complete framebuffer object. CFBOs are used to render to textures and can be used for various effects.

Parameters
cFboA pointer to a CFBO structure that will hold the framebuffer information.

◆ free_cfbo()

void free_cfbo ( CFBO cFbo)

Frees the resources associated with a CFBO.

This function deallocates and cleans up the resources used by a CFBO. It should be called when the framebuffer is no longer needed to avoid memory leaks.

Parameters
cFboA pointer to a CFBO structure that holds the framebuffer information to be freed.

◆ resize_cfbo()

void resize_cfbo ( CFBO cFbo)

Resizes a CFBO.

This function adjusts the size of an existing CFBO to match new dimensions. It is useful when the window or viewport size changes and the framebuffer needs to be updated accordingly.

Parameters
cFboA pointer to a CFBO structure that holds the framebuffer information to be resized.

◆ create_msaa()

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.

Parameters
msaaA pointer to an MSAA structure that will hold the framebuffer information.
Note
DEPRECATED: This function is deprecated and should not be used in new code.

◆ free_msaa()

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.

Parameters
msaaA pointer to an MSAA structure that holds the framebuffer information to be freed.
Note
DEPRECATED: This function is deprecated and should not be used in new code.

◆ resize_msaa()

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.

Parameters
msaaA pointer to an MSAA structure that holds the framebuffer information to be resized.
Note
DEPRECATED: This function is deprecated and should not be used in new code.