From 6096469348d8d94ed0a92a6123983eba772cf347 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 17 Jan 2023 17:29:49 +0100 Subject: Add option to set window background color This window background color is different than window.clear(color) because this window color is the background color if the window itself, which means if there is a delay between creating the window and the first frame display then the window background color is black, but if window color is set then that color will be displayed instead. Normally you want to set the window background color to the same color as the color you use in window.clear(color). --- include/mglpp/window/Window.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp index 2ba61ff..2f148e7 100644 --- a/include/mglpp/window/Window.hpp +++ b/include/mglpp/window/Window.hpp @@ -45,6 +45,7 @@ namespace mgl { bool hidden = false; bool override_redirect = false; bool support_alpha = false; /* support alpha for the window */ + Color background_color = {0, 0, 0, 0}; }; Window(); -- cgit v1.2.3