Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
CyberVillain's avatar
CyberVillain
Honored Guest
12 years ago

Porting to new SDK

Hi there, I'm having trouble porting to the new SDK

I have this

extern "C"
{
#include "../include/ovr_freepie.h"
}
#include <OVR.h>

using namespace OVR;

ovrHmd HMD;

int ovr_freepie_init(float dt)
{
ovr_Initialize();
HMD = ovrHmd_Create(0);
if (!HMD) return 1;

ovrHmd_SetEnabledCaps(HMD, ovrHmdCap_DynamicPrediction);

ovrHmd_ConfigureTracking(HMD, ovrTrackingCap_Orientation |
ovrTrackingCap_MagYawCorrection |
ovrTrackingCap_Position, 0);

return 0;
}

int ovr_freepie_reset_orientation()
{
ovrHmd_RecenterPose(HMD);
return 0;
}

int ovr_freepie_read(ovr_freepie_3dof *output)
{
ovrTrackingState ts = ovrHmd_GetTrackingState(HMD, ovr_GetTimeInSeconds());

Posef pose = ts.HeadPose.ThePose;

pose.Rotation.GetEulerAngles<Axis_Y, Axis_X, Axis_Z>(&output->yaw, &output->pitch, &output->roll);

return 0;
}

int ovr_freepie_destroy()
{
ovrHmd_Destroy(HMD);
ovr_Shutdown();

return 0;
}


It takes several seconds until init returns and then I get a null HMD, so I guess something in the library is timing out?
I got the DK1

I'm getting this in debug

Debug: Performance timer Vista flag = 1
Debug: [NetClient] OnConnectionAttemptFailed
Debug: [NetClient] OnConnectionAttemptFailed
Debug: [NetClient] OnConnectionAttemptFailed

22 Replies