Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
Effects.h
1/*
2 * Gamedev Framework (gf)
3 * Copyright (C) 2016-2022 Julien Bernard
4 *
5 * This software is provided 'as-is', without any express or implied
6 * warranty. In no event will the authors be held liable for any damages
7 * arising from the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software
15 * in a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 * 2. Altered source versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 */
21#ifndef GF_EFFECTS_H
22#define GF_EFFECTS_H
23
24#include "Effect.h"
25#include "GraphicsApi.h"
26
27namespace gf {
28#ifndef DOXYGEN_SHOULD_SKIP_THIS
29inline namespace v1 {
30#endif
31
38 class GF_GRAPHICS_API DefaultEffect : public Effect {
39 public:
44 };
45
46
53 class GF_GRAPHICS_API AntiAliasingEffect : public Effect {
54 public:
59
66 };
67
68
78 class GF_GRAPHICS_API ColorMatrixEffect : public Effect {
79 public:
84
94 void setColorMatrix(const Matrix4f& mat);
95 };
96
101 class GF_GRAPHICS_API ColorEffect : public ColorMatrixEffect {
102 public:
106 enum Type {
113 };
114
121
127 void setType(Type type);
128 };
129
140 class GF_GRAPHICS_API ColorBlindEffect : public ColorMatrixEffect {
141 public:
145 enum Type {
155 };
156
162 ColorBlindEffect(Type type = Normal);
163
169 void setType(Type type);
170 };
171
172
180 class GF_GRAPHICS_API EdgeEffect : public Effect {
181 public:
186
193 };
194
195#ifndef DOXYGEN_SHOULD_SKIP_THIS
196}
197#endif
198}
199
200#endif // GF_EFFECTS_H
Anti-aliasing effect.
Definition: Effects.h:53
AntiAliasingEffect()
Default constructor.
void setFramebufferSize(Vector2f size)
Set the framebuffer size.
Simulation of color blindness.
Definition: Effects.h:140
void setType(Type type)
Change the type of color blindness.
Type
Type of color blindness.
Definition: Effects.h:145
@ Achromatopsia
Achromatopsia (rod monochromacy, very rare)
Definition: Effects.h:153
@ Tritanomaly
Tritanomaly (blue trichromacy, very rare)
Definition: Effects.h:152
@ Protanopia
Protanopia (red dichromacy, 1% of males affected)
Definition: Effects.h:147
@ Tritanopia
Tritanopia (blue dichromacy, rare)
Definition: Effects.h:151
@ Achromatomaly
Achromatomaly (blue cone monochromacy, very rare)
Definition: Effects.h:154
@ Normal
Normal vision.
Definition: Effects.h:146
@ Protanomaly
Protanomaly (red trichromacy, 1% of males affected)
Definition: Effects.h:148
@ Deuteranopia
Deuteranopia (green dichromacy, 1% of males affected)
Definition: Effects.h:149
@ Deuteranomaly
Deuteranomaly (green trichromacy, 6% of males affected)
Definition: Effects.h:150
ColorBlindEffect(Type type=Normal)
Constructor.
Simple color effects.
Definition: Effects.h:101
Type
Type of color effect.
Definition: Effects.h:106
@ Sepia
Sepia colors.
Definition: Effects.h:109
@ Cool
Cool colors.
Definition: Effects.h:112
@ Warm
Warm colors.
Definition: Effects.h:111
@ Grayscale
Grayscale.
Definition: Effects.h:108
@ Normal
No effect.
Definition: Effects.h:107
@ NightVision
Night vision.
Definition: Effects.h:110
ColorEffect(Type type)
Constructor.
void setType(Type type)
Change the type of color effect.
Generic color matrix effect.
Definition: Effects.h:78
ColorMatrixEffect()
Default constructor.
void setColorMatrix(const Matrix4f &mat)
Set the color matrix.
Default effect.
Definition: Effects.h:38
DefaultEffect()
Default constructor.
Edge detector.
Definition: Effects.h:180
EdgeEffect()
Default constructor.
void setFramebufferSize(Vector2f size)
Set the framebuffer size.
A post-processing effect.
Definition: Effect.h:38
The namespace for gf classes.
General purpose math matrix.
Definition: Matrix.h:60