diff options
author | David Snopek <dsnopek@gmail.com> | 2024-03-25 08:07:28 -0500 |
---|---|---|
committer | David Snopek <dsnopek@gmail.com> | 2024-04-04 09:20:23 -0500 |
commit | 0f2b804059331f2454e060577ae0e1b44675c5aa (patch) | |
tree | f83679824636edffe9827d9d968b0b85d2e54708 /servers/rendering/renderer_viewport.cpp | |
parent | 29b3d9e9e538f0aa8effc8ad8bf19a2915292a89 (diff) | |
download | redot-engine-0f2b804059331f2454e060577ae0e1b44675c5aa.tar.gz |
Add support for OpenXR composition layers
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
Diffstat (limited to 'servers/rendering/renderer_viewport.cpp')
-rw-r--r-- | servers/rendering/renderer_viewport.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/servers/rendering/renderer_viewport.cpp b/servers/rendering/renderer_viewport.cpp index bafabf16b8..2e57e0b801 100644 --- a/servers/rendering/renderer_viewport.cpp +++ b/servers/rendering/renderer_viewport.cpp @@ -802,8 +802,6 @@ void RendererViewport::draw_viewports(bool p_swap_buffers) { } else #endif // _3D_DISABLED { - RSG::texture_storage->render_target_set_override(vp->render_target, RID(), RID(), RID()); - RSG::scene->set_debug_draw_mode(vp->debug_draw); // render standard mono camera @@ -1062,6 +1060,13 @@ void RendererViewport::viewport_set_update_mode(RID p_viewport, RS::ViewportUpda viewport->update_mode = p_mode; } +RS::ViewportUpdateMode RendererViewport::viewport_get_update_mode(RID p_viewport) const { + Viewport *viewport = viewport_owner.get_or_null(p_viewport); + ERR_FAIL_NULL_V(viewport, RS::VIEWPORT_UPDATE_DISABLED); + + return viewport->update_mode; +} + RID RendererViewport::viewport_get_render_target(RID p_viewport) const { const Viewport *viewport = viewport_owner.get_or_null(p_viewport); ERR_FAIL_NULL_V(viewport, RID()); |