What can cause ovrHmd_CreateDebug to fail
Hi,
I've written some programs with the Oculus Rift SDK 0.3.2 and everything worked fine.
I ran them with both a 'real' Oculus and the 'false' one, aka created with
But here I've come to an unexpected issue: the following code throws the exception:
The code for ovrHmd_CreateDebug is quite simple (located in CAPI_HmdState.cpp):
So I suppose
Until now I did not bother with any GlobalState::pInstance...
Maybe someone knows the cause of the problem or experienced it before?
Thanks for your help
I've written some programs with the Oculus Rift SDK 0.3.2 and everything worked fine.
I ran them with both a 'real' Oculus and the 'false' one, aka created with
ovrHmd_CreateDebug(ovrHmd_DK1)
But here I've come to an unexpected issue: the following code throws the exception:
hmd_ = ovrHmd_Create(0);
if (!hmd_)
{
hmd_ = ovrHmd_CreateDebug(ovrHmd_DK1);
if(!hmd_)
{
throw std::runtime_error("Cannot create the debug dk1");
}
}
The code for ovrHmd_CreateDebug is quite simple (located in CAPI_HmdState.cpp):
OVR_EXPORT ovrHmd ovrHmd_CreateDebug(ovrHmdType type)
{
if (!GlobalState::pInstance)
return 0;
HMDState* hmds = new HMDState(type);
return hmds;
}
So I suppose
GlobalState::pInstanceis null, but how? why?
Until now I did not bother with any GlobalState::pInstance...
Maybe someone knows the cause of the problem or experienced it before?
Thanks for your help
