Add vrChaperone;

This commit is contained in:
bjorn 2016-09-29 23:54:38 -07:00
parent 1e1acfbbd9
commit 056efecc21
1 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,7 @@
typedef struct {
struct VR_IVRSystem_FnTable* vrSystem;
struct VR_IVRCompositor_FnTable* vrCompositor;
struct VR_IVRChaperone_FnTable* vrChaperone;
unsigned int deviceIndex;
@ -75,6 +76,13 @@ Headset* viveInit() {
return NULL;
}
sprintf(fnTableName, "FnTable:%s", IVRChaperone_Version);
state->vrChaperone = (struct VR_IVRChaperone_FnTable*) VR_GetGenericInterface(fnTableName, &vrError);
if (vrError != EVRInitError_VRInitError_None || state->vrChaperone == NULL) {
error("Problem initializing VRChaperone");
return NULL;
}
state->deviceIndex = k_unTrackedDeviceIndex_Hmd;
state->clipNear = 0.1f;
state->clipFar = 30.f;