From c6d09be0a56c7b96be48f074901a53d7f76c25cc Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 17 Jan 2023 17:26:46 +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/mgl/window/window.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/mgl/window/window.h b/include/mgl/window/window.h index 27926b2..cb5a2eb 100644 --- a/include/mgl/window/window.h +++ b/include/mgl/window/window.h @@ -54,6 +54,7 @@ typedef struct { bool hidden; /* false by default */ bool override_redirect; /* false by default */ bool support_alpha; /* support alpha for the window, false by default */ + mgl_color background_color; /* default: black */ } mgl_window_create_params; typedef enum { -- cgit v1.2.3