diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-07 11:11:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-07 11:11:50 +0200 |
commit | 4942e96897dcf3506af19ab673fc0dd5b905960c (patch) | |
tree | 7a222579cff35097308ba02ce3486ca7ab0da61e /modules/gdnative/arvr/arvr_interface_gdnative.cpp | |
parent | f4f244ed4ee1e271f7e492bf60ffe2867c643648 (diff) | |
parent | 8349d4fbd99052db5a2e66a4ff9b3d44e3ceabac (diff) |
Merge pull request #27527 from BastiaanOlij/render_ext_target
Add option to have viewport render into supplied texture (VR)
Diffstat (limited to 'modules/gdnative/arvr/arvr_interface_gdnative.cpp')
-rw-r--r-- | modules/gdnative/arvr/arvr_interface_gdnative.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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); |