diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-07 10:44:42 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-07 10:44:42 +0200 |
commit | 2ea32e11093a4d057338c02abbff4807446ff8de (patch) | |
tree | d8897b782bf35e2fa1e2528de26c2e3ecc8c3780 | |
parent | d807484f7132d6dd160482a148c9bc1d01d5038e (diff) |
glClear if compositor in use
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index bb67932..38b2df4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -592,7 +592,7 @@ int main(int argc, char **argv) { window_texture_tex.id = window_texture.texture_id; window_texture_tex.width = geometry.width; window_texture_tex.height = geometry.height; - window_texture_tex.format = MGL_TEXTURE_FORMAT_RGBA; + window_texture_tex.format = MGL_TEXTURE_FORMAT_RGB; window_texture_tex.max_width = 1 << 15; window_texture_tex.max_height = 1 << 15; window_texture_tex.pixel_coordinates = false; @@ -935,12 +935,11 @@ int main(int argc, char **argv) { page_stack.top()->on_event(event, window, mgl::vec2f(0.0f, 0.0f)); const auto render = [&] { + window.clear(bg_color); if(window_texture_loaded && window_texture.texture_id) { - window.clear(mgl::Color(0, 0, 0, 255)); window.draw(window_texture_sprite); window.draw(bg_screenshot_overlay); } else if(screenshot_texture.is_valid()) { - window.clear(bg_color); window.draw(screenshot_sprite); window.draw(bg_screenshot_overlay); } |