Commit f533d737 authored by Ryan Pavlik's avatar Ryan Pavlik

st/oxr: Improve action space stubs.

parent 0b2b99ca
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment