aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-10-19 07:05:31 +0200
committerdec05eba <dec05eba@protonmail.com>2021-10-19 07:05:31 +0200
commit6a524b46cb9c74c8d1b710c23bbc62bdafd54bb2 (patch)
tree1dd13bd15b7f2c6de94a318e2d537f6bb7378dff /include
parent3e081d1669622bbc276b038ddc38ecf0600683c3 (diff)
Use uint8_t for color instead of float
Diffstat (limited to 'include')
-rw-r--r--include/mglpp/graphics/Color.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/mglpp/graphics/Color.hpp b/include/mglpp/graphics/Color.hpp
index d1c1745..0d0ac15 100644
--- a/include/mglpp/graphics/Color.hpp
+++ b/include/mglpp/graphics/Color.hpp
@@ -1,12 +1,15 @@
#ifndef MGLPP_COLOR_HPP
#define MGLPP_COLOR_HPP
+#include <stdint.h>
+
namespace mgl {
struct Color {
- float r = 1.0f;
- float g = 1.0f;
- float b = 1.0f;
- float a = 1.0f;
+ Color(uint8_t r = 255, uint8_t g = 255, uint8_t b = 255, uint8_t a = 255) : r(r), g(g), b(b), a(a) {
+
+ }
+
+ uint8_t r, g, b, a;
};
}