summaryrefslogtreecommitdiff
path: root/servers/visual/visual_server_viewport.h
diff options
context:
space:
mode:
authorBastiaanOlij <mux213@gmail.com>2017-04-23 22:10:41 +1000
committerBastiaanOlij <mux213@gmail.com>2017-07-28 10:39:15 +1000
commitd2ba2d08733647dc345db123469988966c8b31b0 (patch)
tree878817443d5929948e1b05e1d1eb39fe2091cd40 /servers/visual/visual_server_viewport.h
parent411f09a512d5847fc9c6270439308d1e3093f211 (diff)
Adding base classes and structures for ARVR support
Added ArVrScriptInterface Added ARVRCamera, ARVRController and ARVROrigin helper objects
Diffstat (limited to 'servers/visual/visual_server_viewport.h')
-rw-r--r--servers/visual/visual_server_viewport.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/servers/visual/visual_server_viewport.h b/servers/visual/visual_server_viewport.h
index f963ce4aa3..93227d1c31 100644
--- a/servers/visual/visual_server_viewport.h
+++ b/servers/visual/visual_server_viewport.h
@@ -32,6 +32,7 @@
#include "rasterizer.h"
#include "self_list.h"
+#include "servers/arvr/arvr_interface.h"
#include "servers/visual_server.h"
class VisualServerViewport {
@@ -44,6 +45,8 @@ public:
RID self;
RID parent;
+ bool use_arvr; /* use arvr interface to override camera positioning and projection matrices and control output */
+
Size2i size;
RID camera;
RID scenario;
@@ -107,6 +110,7 @@ public:
for (int i = 0; i < VS::VIEWPORT_RENDER_INFO_MAX; i++) {
render_info[i] = 0;
}
+ use_arvr = false;
}
};
@@ -131,11 +135,13 @@ public:
private:
Color clear_color;
- void _draw_viewport(Viewport *p_viewport);
+ void _draw_viewport(Viewport *p_viewport, ARVRInterface::Eyes p_eye = ARVRInterface::EYE_MONO);
public:
RID viewport_create();
+ void viewport_set_use_arvr(RID p_viewport, bool p_use_arvr);
+
void viewport_set_size(RID p_viewport, int p_width, int p_height);
void viewport_attach_to_screen(RID p_viewport, const Rect2 &p_rect = Rect2(), int p_screen = 0);