summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-15 09:49:24 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-15 09:49:24 +0100
commiteff6508d5ae94fcdbff8ea9f40ebfa91d0cdc5f7 (patch)
treed4d7a35fe1758730f98ec23613582186fd651c61 /scene/main
parent22a4927a44ee28a9dddd800bf4c50db7001097af (diff)
parent081b31d20091806eb32d13561df997fd734ca7b3 (diff)
Merge pull request #73300 from clayjohn/GL-clear_window
Clear Window before blitting Viewport in gl_compatibility renderer
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/window.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 6fbf6ccb81..b79a9ba444 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -984,17 +984,13 @@ void Window::_update_viewport_size() {
Size2 margin;
Size2 offset;
- //black bars and margin
+
if (content_scale_aspect != CONTENT_SCALE_ASPECT_EXPAND && screen_size.x < video_mode.x) {
margin.x = Math::round((video_mode.x - screen_size.x) / 2.0);
- //RenderingServer::get_singleton()->black_bars_set_margins(margin.x, 0, margin.x, 0);
offset.x = Math::round(margin.x * viewport_size.y / screen_size.y);
} else if (content_scale_aspect != CONTENT_SCALE_ASPECT_EXPAND && screen_size.y < video_mode.y) {
margin.y = Math::round((video_mode.y - screen_size.y) / 2.0);
- //RenderingServer::get_singleton()->black_bars_set_margins(0, margin.y, 0, margin.y);
offset.y = Math::round(margin.y * viewport_size.x / screen_size.x);
- } else {
- //RenderingServer::get_singleton()->black_bars_set_margins(0, 0, 0, 0);
}
switch (content_scale_mode) {