diff options
| author | Karroffel | 2017-10-14 18:05:01 +0200 |
|---|---|---|
| committer | Karroffel | 2017-10-14 18:18:02 +0200 |
| commit | e0019453a227036660e90f67e8df8207fcb48b46 (patch) | |
| tree | 8a57f3080fbe4f028e8203a135b6843283d80888 /modules/gdnative/include | |
| parent | e568f80e6ee61407dfe7f403f123679ec55b1e53 (diff) | |
| download | godot-e0019453a227036660e90f67e8df8207fcb48b46.tar.gz godot-e0019453a227036660e90f67e8df8207fcb48b46.tar.zst godot-e0019453a227036660e90f67e8df8207fcb48b46.zip | |
update ARVRInterfaceGDNative to use API struct
Diffstat (limited to 'modules/gdnative/include')
| -rw-r--r-- | modules/gdnative/include/gdnative/gdnative.h | 2 | ||||
| -rw-r--r-- | modules/gdnative/include/nativearvr/godot_nativearvr.h | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h index 2d1ad90fe..25d45db30 100644 --- a/modules/gdnative/include/gdnative/gdnative.h +++ b/modules/gdnative/include/gdnative/gdnative.h @@ -47,7 +47,7 @@ extern "C" { #define GDAPI GDCALLINGCONV #endif #else -#define GDCALLINGCONV __attribute__((sysv_abi, visibility("default"))) +#define GDCALLINGCONV __attribute__((sysv_abi)) #define GDAPI GDCALLINGCONV #endif diff --git a/modules/gdnative/include/nativearvr/godot_nativearvr.h b/modules/gdnative/include/nativearvr/godot_nativearvr.h index f86919f33..ee557843c 100644 --- a/modules/gdnative/include/nativearvr/godot_nativearvr.h +++ b/modules/gdnative/include/nativearvr/godot_nativearvr.h @@ -36,6 +36,26 @@ extern "C" { #endif +typedef struct { + void *(*constructor)(godot_object *); + void (*destructor)(void *); + godot_string (*get_name)(const void *); + godot_int (*get_capabilities)(const void *); + godot_bool (*get_anchor_detection_is_enabled)(const void *); + void (*set_anchor_detection_is_enabled)(void *, godot_bool); + godot_bool (*is_stereo)(const void *); + godot_bool (*is_initialized)(const void *); + godot_bool (*initialize)(void *); + void (*uninitialize)(void *); + godot_vector2 (*get_recommended_render_targetsize)(const void *); + godot_transform (*get_transform_for_eye)(void *, godot_int, godot_transform *); + void (*fill_projection_for_eye)(void *, godot_real *, godot_int, godot_real, godot_real, godot_real); + void (*commit_for_eye)(void *, godot_int, godot_rid *, godot_rect2 *); + void (*process)(void *); +} godot_arvr_interface_gdnative; + +void GDAPI godot_arvr_register_interface(const char *p_name, const godot_arvr_interface_gdnative *p_interface); + // helper functions to access ARVRServer data godot_real GDAPI godot_arvr_get_worldscale(); godot_transform GDAPI godot_arvr_get_reference_frame(); @@ -55,4 +75,4 @@ void GDAPI godot_arvr_set_controller_axis(godot_int p_controller_id, godot_int p } #endif -#endif /* !GODOT_NATIVEARVR_H */
\ No newline at end of file +#endif /* !GODOT_NATIVEARVR_H */ |
