From 6a524b46cb9c74c8d1b710c23bbc62bdafd54bb2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 19 Oct 2021 07:05:31 +0200 Subject: Use uint8_t for color instead of float --- include/mglpp/graphics/Color.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include') 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 + 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; }; } -- cgit v1.2.3