![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Manages post processing effects to apply to combined scene. More...
#include <PostProcess.hpp>
Collaboration diagram for galaxy::graphics::PostProcess:Public Member Functions | |
| PostProcess () | |
| Constructor. | |
| ~PostProcess () | |
| Destructor. | |
| void | init (const int width, const int height) |
| Initialize post processor and GL buffers. | |
| void | destroy () |
| Cleanup used memory. | |
| template<is_posteffect Effect, typename... Args> | |
| Effect * | add (Args &&... args) |
| Add an effect to process. | |
| void | bind () |
| Bind to draw to post processor framebuffer. | |
| void | unbind () |
| Unbind to draw to post processor framebuffer. | |
| void | render_effects () |
| Draw post effects to stored framebuffer. | |
| void | render_output () |
| Draw finished post effects to default framebuffer (screen). | |
| void | resize (const int width, const int height) |
| Resize framebuffers. | |
Private Attributes | |
| RenderTexture | m_fb |
| For geometry and lighting. | |
| Shader | m_output |
| Simple output shader. | |
| meta::vector< std::unique_ptr< graphics::PostEffect > > | m_effects |
| List of effects to apply in order. | |
| unsigned int | m_screen_vbo |
| Simple quad to draw when applying effects (buffer). | |
| unsigned int | m_screen_vao |
| Simple quad to draw when applying effects (array). | |
| unsigned int | m_output_fb |
| Output cache. | |
Manages post processing effects to apply to combined scene.
Definition at line 26 of file PostProcess.hpp.
| galaxy::graphics::PostProcess::PostProcess | ( | ) |
Constructor.
Definition at line 49 of file PostProcess.cpp.
| galaxy::graphics::PostProcess::~PostProcess | ( | ) |
Destructor.
Definition at line 56 of file PostProcess.cpp.
Here is the call graph for this function:| void galaxy::graphics::PostProcess::init | ( | const int | width, |
| const int | height ) |
Initialize post processor and GL buffers.
| width | Width of internal framebuffer. |
| height | Height of internal framebuffer. |
Definition at line 61 of file PostProcess.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::graphics::PostProcess::destroy | ( | ) |
Cleanup used memory.
Definition at line 100 of file PostProcess.cpp.
Here is the caller graph for this function:
|
inline |
Add an effect to process.
| Effect | Post-Processing Effect to use. |
| Args | Variadic Arguments. |
Make sure the effects are in the correct order. They are rendered in the order they are added.
| args | Constructor arguments. |
Definition at line 130 of file PostProcess.hpp.
Here is the caller graph for this function:| void galaxy::graphics::PostProcess::bind | ( | ) |
Bind to draw to post processor framebuffer.
Definition at line 129 of file PostProcess.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::graphics::PostProcess::unbind | ( | ) |
Unbind to draw to post processor framebuffer.
Definition at line 134 of file PostProcess.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::graphics::PostProcess::render_effects | ( | ) |
Draw post effects to stored framebuffer.
Definition at line 139 of file PostProcess.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::graphics::PostProcess::render_output | ( | ) |
Draw finished post effects to default framebuffer (screen).
Definition at line 155 of file PostProcess.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::graphics::PostProcess::resize | ( | const int | width, |
| const int | height ) |
Resize framebuffers.
| width | New width of internal framebuffer. |
| height | New height of internal framebuffer. |
Definition at line 119 of file PostProcess.cpp.
Here is the call graph for this function:
|
private |
For geometry and lighting.
Definition at line 101 of file PostProcess.hpp.
|
private |
Simple output shader.
Definition at line 106 of file PostProcess.hpp.
|
private |
List of effects to apply in order.
Definition at line 111 of file PostProcess.hpp.
|
private |
Simple quad to draw when applying effects (buffer).
Definition at line 116 of file PostProcess.hpp.
|
private |
Simple quad to draw when applying effects (array).
Definition at line 121 of file PostProcess.hpp.
|
private |
Output cache.
Definition at line 126 of file PostProcess.hpp.