mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
st/oxr: Improve action space stubs.
This commit is contained in:
parent
0b2b99ca89
commit
f533d737b9
|
@ -35,8 +35,16 @@ oxr_xrCreateActionSpace(XrAction action,
|
|||
OXR_VERIFY_ARG_TYPE_AND_NULL(&log, createInfo,
|
||||
XR_TYPE_ACTION_SPACE_CREATE_INFO);
|
||||
|
||||
//! @todo Implement
|
||||
return oxr_error(&log, XR_ERROR_HANDLE_INVALID, " not implemented");
|
||||
|
||||
struct oxr_space* spc;
|
||||
XrResult ret = oxr_space_action_create(&log, act, createInfo, &spc);
|
||||
if (ret != XR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
*space = oxr_space_to_openxr(spc);
|
||||
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
|
||||
static const XrReferenceSpaceType session_spaces[] = {
|
||||
|
|
|
@ -52,6 +52,27 @@ oxr_space_destroy(struct oxr_logger *log, struct oxr_handle_base *hb)
|
|||
return XR_SUCCESS;
|
||||
}
|
||||
|
||||
XrResult
|
||||
oxr_space_action_create(struct oxr_logger *log,
|
||||
struct oxr_action *act,
|
||||
const XrActionSpaceCreateInfo *createInfo,
|
||||
struct oxr_space **out_space)
|
||||
{
|
||||
struct oxr_space *spc = NULL;
|
||||
OXR_ALLOCATE_HANDLE_OR_RETURN(log, spc, OXR_XR_DEBUG_SPACE,
|
||||
oxr_space_destroy, &act->handle);
|
||||
|
||||
//! @todo implement more fully
|
||||
oxr_warn(log, " not fully implemented");
|
||||
|
||||
spc->is_reference = false;
|
||||
memcpy(&spc->pose, &createInfo->poseInActionSpace, sizeof(spc->pose));
|
||||
|
||||
*out_space = spc;
|
||||
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
|
||||
XrResult
|
||||
oxr_space_reference_create(struct oxr_logger *log,
|
||||
struct oxr_session *sess,
|
||||
|
|
Loading…
Reference in a new issue