From 8349d4fbd99052db5a2e66a4ff9b3d44e3ceabac Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Sun, 31 Mar 2019 00:03:49 +1100 Subject: Add option to have viewport render into supplied texture --- modules/gdnative/arvr/arvr_interface_gdnative.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'modules/gdnative/arvr/arvr_interface_gdnative.cpp') diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp index 9cd37ac950..8c602e0cba 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp +++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp @@ -198,6 +198,17 @@ CameraMatrix ARVRInterfaceGDNative::get_projection_for_eye(ARVRInterface::Eyes p return cm; } +unsigned int ARVRInterfaceGDNative::get_external_texture_for_eye(ARVRInterface::Eyes p_eye) { + + ERR_FAIL_COND_V(interface == NULL, 0); + + if ((interface->version.major > 1) || ((interface->version.major) == 1 && (interface->version.minor >= 1))) { + return (unsigned int)interface->get_external_texture_for_eye(data, (godot_int)p_eye); + } else { + return 0; + } +} + void ARVRInterfaceGDNative::commit_for_eye(ARVRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) { ERR_FAIL_COND(interface == NULL); -- cgit v1.2.3