From a0971b0a124f7c1ff040cc226aaa0ce7e58b8a40 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 2 Aug 2024 06:01:50 +0200 Subject: Ensure correct blending function for transparent window --- include/mglpp/window/Window.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mglpp/window/Window.hpp b/include/mglpp/window/Window.hpp index 7d3f90b..6e4e485 100644 --- a/include/mglpp/window/Window.hpp +++ b/include/mglpp/window/Window.hpp @@ -44,7 +44,7 @@ namespace mgl { WindowHandle parent_window = 0; /* 0 = root window */ bool hidden = false; bool override_redirect = false; - bool support_alpha = false; /* support alpha for the window */ + bool support_alpha = false; /* support alpha for the window. If this is set to true then you need to call window.set_texture_blend_func before rendering textures and call window.set_render_blend_func afterwards to ensure correct alpha blending */ bool hide_decorations = false; /* this is a hint, it may be ignored by the window manager */ Color background_color = {0, 0, 0, 0}; const char *class_name = nullptr; @@ -107,6 +107,9 @@ namespace mgl { bool get_clipboard(ClipboardCallback callback); std::string get_clipboard_string(); + void set_texture_blend_func(); + void set_render_blend_func(); + WindowHandle get_system_handle() const; mgl_window* internal_window(); -- cgit v1.2.3