summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-03-23 10:15:15 +0100
committerGitHub <noreply@github.com>2018-03-23 10:15:15 +0100
commitaebe55210ade8832c7afad8a89c6dd441ddf89bb (patch)
tree37694b5030eec3d43837bffa5dd88b391c093fb5 /servers/visual
parentff2cb002d5af6db56224cdca87f91894e39e58e1 (diff)
parent53564233771529881d56110cff82be59372c0274 (diff)
Merge pull request #17532 from BastiaanOlij/arvr_enhancements
A few enhancements on the ARVR Server
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/visual_server_viewport.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp
index 3eb8953c1f..83e05f6f25 100644
--- a/servers/visual/visual_server_viewport.cpp
+++ b/servers/visual/visual_server_viewport.cpp
@@ -239,10 +239,9 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E
void VisualServerViewport::draw_viewports() {
// get our arvr interface in case we need it
Ref<ARVRInterface> arvr_interface = ARVRServer::get_singleton()->get_primary_interface();
- if (arvr_interface.is_valid()) {
- // update our positioning information as late as possible...
- arvr_interface->process();
- }
+
+ // process all our active interfaces
+ ARVRServer::get_singleton()->_process();
clear_color = GLOBAL_GET("rendering/environment/default_clear_color");
@@ -286,6 +285,9 @@ void VisualServerViewport::draw_viewports() {
_draw_viewport(vp, ARVRInterface::EYE_RIGHT);
arvr_interface->commit_for_eye(ARVRInterface::EYE_RIGHT, vp->render_target, vp->viewport_to_screen_rect);
}
+
+ // and for our frame timing, mark when we've finished commiting our eyes
+ ARVRServer::get_singleton()->_mark_commit();
} else {
VSG::rasterizer->set_current_render_target(vp->render_target);