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
14
15namespace 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:
92
97
101 float m_gamma;
102 };
103 } // namespace graphics
104} // namespace galaxy
105
106#endif
bool is_enabled() override
Is this effect enabled?
virtual ~GammaCorrection()=default
Destructor.
void set_gamma(const float gamma_mod)
Set gamma modifier.
unsigned int render(const unsigned int input) override
Render effect to input texture.
float m_gamma
Amount to adjust gamma by.
RenderTexture m_fb
Framebuffer to render effect to.
float get_gamma() const
Get gamma modifier.
GammaCorrection()=delete
Constructor.
void resize(const int width, const int height) override
Resize framebuffers.
Shader m_shader
Shader for post processing effect.
Manages post processing effects to apply to combined scene.
Draw to an opengl texture instead of the screen.
OpenGL Shader Program.
Definition Shader.hpp:29
Animated.cpp galaxy.
Definition Animated.cpp:16