]> git.localhorst.tv Git - gworm.git/blob - src/graphics/Color.h
added texture support
[gworm.git] / src / graphics / Color.h
1 #ifndef SPACE_COLOR_H_
2 #define SPACE_COLOR_H_
3
4 #include <SDL.h>
5
6
7 namespace gworm {
8
9 struct Color {
10
11         // NOTE: this depends on endianness and should be defined accordingly
12         static constexpr Uint32 Format = SDL_PIXELFORMAT_ABGR8888;
13
14         constexpr Color()
15         : Color(0, 0, 0) { }
16         constexpr Color(Uint8 r, Uint8 g, Uint8 b, Uint8 a = 0xFF)
17         : r(r), g(g), b(b), a(a) { }
18
19         Uint8 r, g, b, a;
20
21 };
22
23 }
24
25 #endif