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). --- depends/mgl | 2 +- include/mglpp/window/Window.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/depends/mgl b/depends/mgl index bb77099..c6d09be 160000 --- a/depends/mgl +++ b/depends/mgl @@ -1 +1 @@ -Subproject commit bb770991b2d688b247106e116c1ee222c6dbbe11 +Subproject commit c6d09be0a56c7b96be48f074901a53d7f76c25cc 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