diff options
author | Bastiaan Olij <mux213@gmail.com> | 2024-07-29 10:49:48 +1000 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2024-07-29 12:46:58 +1000 |
commit | 1eb0039b6eae3f4fab75ca6bb746712a233d32cb (patch) | |
tree | ec564d64e8a4cf47838008ab7a9feb8b9a4a8a08 /servers/rendering/renderer_viewport.cpp | |
parent | 88d9325065a3e00e9e168ffad4ff93e12455a357 (diff) | |
download | redot-engine-1eb0039b6eae3f4fab75ca6bb746712a233d32cb.tar.gz |
Fix regression around OpenGL swapchain optimisation for OpenXR
Diffstat (limited to 'servers/rendering/renderer_viewport.cpp')
-rw-r--r-- | servers/rendering/renderer_viewport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index 10e295ab04..1049cb63cd 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -786,6 +786,7 @@ void RendererViewport::draw_viewports(bool p_swap_buffers) { if (OS::get_singleton()->get_current_rendering_driver_name().begins_with("opengl3")) { if (blits.size() > 0) { RSG::rasterizer->blit_render_targets_to_screen(vp->viewport_to_screen, blits.ptr(), blits.size()); + RSG::rasterizer->gl_end_frame(p_swap_buffers); } } else if (blits.size() > 0) { if (!blit_to_screen_list.has(vp->viewport_to_screen)) { @@ -796,7 +797,6 @@ void RendererViewport::draw_viewports(bool p_swap_buffers) { blit_to_screen_list[vp->viewport_to_screen].push_back(blits[b]); } } - RSG::rasterizer->end_viewport(p_swap_buffers && blits.size() > 0); } } } else @@ -826,10 +826,10 @@ void RendererViewport::draw_viewports(bool p_swap_buffers) { Vector<BlitToScreen> blit_to_screen_vec; blit_to_screen_vec.push_back(blit); RSG::rasterizer->blit_render_targets_to_screen(vp->viewport_to_screen, blit_to_screen_vec.ptr(), 1); + RSG::rasterizer->gl_end_frame(p_swap_buffers); } else { blit_to_screen_list[vp->viewport_to_screen].push_back(blit); } - RSG::rasterizer->end_viewport(p_swap_buffers); } } |