Merge pull request #10643 from BastiaanOlij/camera_server

CameraServer class
This commit is contained in:
Rémi Verschelde 2019-06-16 10:22:26 +02:00 committed by GitHub
commit baab976d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 2384 additions and 5 deletions

View file

@ -115,6 +115,17 @@ void ARVRInterfaceGDNative::set_anchor_detection_is_enabled(bool p_enable) {
interface->set_anchor_detection_is_enabled(data, p_enable);
}
int ARVRInterfaceGDNative::get_camera_feed_id() {
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_camera_feed_id(data);
} else {
return 0;
}
}
bool ARVRInterfaceGDNative::is_stereo() {
bool stereo;

View file

@ -66,6 +66,7 @@ public:
/** specific to AR **/
virtual bool get_anchor_detection_is_enabled() const;
virtual void set_anchor_detection_is_enabled(bool p_enable);
virtual int get_camera_feed_id();
/** rendering and internal **/
virtual Size2 get_render_targetsize();

View file

@ -64,6 +64,7 @@ typedef struct {
// only in 1.1 onwards
godot_int (*get_external_texture_for_eye)(void *, godot_int);
void (*notification)(void *, godot_int);
godot_int (*get_camera_feed_id)(void *);
} godot_arvr_interface_gdnative;
void GDAPI godot_arvr_register_interface(const godot_arvr_interface_gdnative *p_interface);