diff options
author | Peter Kim <pk15950@gmail.com> | 2021-10-12 10:18:05 +0300 |
---|---|---|
committer | Peter Kim <pk15950@gmail.com> | 2021-10-12 10:18:05 +0300 |
commit | 9dda65455b54336fe3efef91eba9e41866dac1c1 (patch) | |
tree | 2f8fd6edf8d190e018b63c6b6bdacb38ab7905bd /source/blender/editors/include/ED_space_api.h | |
parent | cfa59b3fabe729e49a57154ce21c5a4b88aa5812 (diff) |
XR Controller Support Step 4: Controller Drawing
Addresses T77127 (Controller Drawing).
Adds VR controller visualization and custom drawing via draw
handlers. Add-ons can draw to the XR surface (headset display) and
mirror window by adding a View3D draw handler of region type 'XR' and
draw type 'POST_VIEW'. Controller drawing and custom overlays can be
toggled individually as XR session options, which will be added in a
future update to the VR Scene Inspection add-on.
For the actual drawing, the OpenXR XR_MSFT_controller_model extension
is used to load a glTF model provided by the XR runtime. The model's
vertex data is then used to create a GPUBatch in the XR session
state. Finally, this batch is drawn via the XR surface draw handler
mentioned above.
For runtimes that do not support the controller model extension, a
a simple fallback shape (sphere) is drawn instead.
Reviewed By: Severin, fclem
Differential Revision: https://developer.blender.org/D10948
Diffstat (limited to 'source/blender/editors/include/ED_space_api.h')
-rw-r--r-- | source/blender/editors/include/ED_space_api.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index 1a3aa7e5496..958df8f7707 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -72,8 +72,9 @@ void *ED_region_draw_cb_activate(struct ARegionType *art, void (*draw)(const struct bContext *, struct ARegion *, void *), void *customdata, int type); -void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int); -void ED_region_draw_cb_exit(struct ARegionType *, void *); +void ED_region_draw_cb_draw(const struct bContext *C, struct ARegion *region, int type); +void ED_region_surface_draw_cb_draw(struct ARegionType *art, int type); +void ED_region_draw_cb_exit(struct ARegionType *art, void *handle); void ED_region_draw_cb_remove_by_type(struct ARegionType *art, void *draw_fn, void (*free)(void *)); |