galaxy
1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
GammaCorrection.hpp
Go to the documentation of this file.
1
7
8
#ifndef GALAXY_GRAPHICS_POST_GAMMACORRECTION_HPP_
9
#define GALAXY_GRAPHICS_POST_GAMMACORRECTION_HPP_
10
11
#include "
galaxy/graphics/gl/Shader.hpp
"
12
#include "
galaxy/graphics/PostEffect.hpp
"
13
#include "
galaxy/graphics/RenderTexture.hpp
"
14
15
namespace
galaxy
16
{
17
namespace
graphics
18
{
24
class
GammaCorrection
final :
public
PostEffect
25
{
26
public
:
33
GammaCorrection
(
const
int
width,
const
int
height);
34
38
virtual
~GammaCorrection
() =
default
;
39
46
void
resize
(
const
int
width,
const
int
height)
override
;
47
55
[[nodiscard]]
56
unsigned
int
render
(
const
unsigned
int
input)
override
;
57
63
void
set_gamma
(
const
float
gamma_mod);
64
70
[[nodiscard]]
71
float
get_gamma
()
const
;
72
78
[[nodiscard]]
79
bool
is_enabled
()
override
;
80
81
private
:
85
GammaCorrection
() =
delete
;
86
87
private
:
91
Shader
m_shader
;
92
96
RenderTexture
m_fb
;
97
101
float
m_gamma
;
102
};
103
}
// namespace graphics
104
}
// namespace galaxy
105
106
#endif
PostEffect.hpp
RenderTexture.hpp
Shader.hpp
galaxy::graphics::GammaCorrection
GammaCorrection effect.
Definition
GammaCorrection.hpp:25
galaxy::graphics::GammaCorrection::is_enabled
bool is_enabled() override
Is this effect enabled?
Definition
GammaCorrection.cpp:130
galaxy::graphics::GammaCorrection::~GammaCorrection
virtual ~GammaCorrection()=default
Destructor.
galaxy::graphics::GammaCorrection::set_gamma
void set_gamma(const float gamma_mod)
Set gamma modifier.
Definition
GammaCorrection.cpp:113
galaxy::graphics::GammaCorrection::render
unsigned int render(const unsigned int input) override
Render effect to input texture.
Definition
GammaCorrection.cpp:101
galaxy::graphics::GammaCorrection::m_gamma
float m_gamma
Amount to adjust gamma by.
Definition
GammaCorrection.hpp:101
galaxy::graphics::GammaCorrection::m_fb
RenderTexture m_fb
Framebuffer to render effect to.
Definition
GammaCorrection.hpp:96
galaxy::graphics::GammaCorrection::get_gamma
float get_gamma() const
Get gamma modifier.
Definition
GammaCorrection.cpp:125
galaxy::graphics::GammaCorrection::GammaCorrection
GammaCorrection()=delete
Constructor.
galaxy::graphics::GammaCorrection::resize
void resize(const int width, const int height) override
Resize framebuffers.
Definition
GammaCorrection.cpp:96
galaxy::graphics::GammaCorrection::m_shader
Shader m_shader
Shader for post processing effect.
Definition
GammaCorrection.hpp:91
galaxy::graphics::PostEffect
Manages post processing effects to apply to combined scene.
Definition
PostEffect.hpp:21
galaxy::graphics::RenderTexture
Draw to an opengl texture instead of the screen.
Definition
RenderTexture.hpp:25
galaxy::graphics::Shader
OpenGL Shader Program.
Definition
Shader.hpp:29
galaxy
Animated.cpp galaxy.
Definition
Animated.cpp:16
galaxy
src
galaxy
graphics
post
GammaCorrection.hpp
Generated on Fri Sep 12 2025 07:29:47 for galaxy by
1.12.0