-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackground.h
More file actions
39 lines (28 loc) · 1019 Bytes
/
background.h
File metadata and controls
39 lines (28 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef SRC_ENGINE_BACKGROUND_H_
#define SRC_ENGINE_BACKGROUND_H_
#include <memory>
#include <iostream>
#include <GLFW/glfw3.h>
#include "spatial/defaults.h"
#include "color.h"
namespace Engine {
class Background {
public:
Background () {};
virtual ~Background () {};
virtual void apply () const {};
};
class BackgroundColor : public Background {
Color color;
public:
inline BackgroundColor () : color(Color::rgb(0, 0, 0)) {};
inline BackgroundColor (Color _color) : color(_color) {};
inline void setColor (Color &_color) { this->color = _color; }
inline void setR (unsigned char _r) { this->color.setR(_r); }
inline void setG (unsigned char _g) { this->color.setR(_g); }
inline void setB (unsigned char _b) { this->color.setR(_b); }
inline void setA (float_max_t _a) { this->color.setA(_a); }
inline void apply (void) const override { this->color.apply(); }
};
};
#endif