MCPcopy Create free account
hub / github.com/LibreVR/Revive / ovr_Create

Function ovr_Create

ReviveXR/REV_CAPI.cpp:202–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202OVR_PUBLIC_FUNCTION(ovrResult) ovr_Create(ovrSession* pSession, ovrGraphicsLuid* pLuid)
203{
204 REV_TRACE(ovr_Create);
205
206 if (!pSession)
207 return ovrError_InvalidParameter;
208
209 *pSession = nullptr;
210
211 // Initialize the opaque pointer with our own OpenXR-specific struct
212 g_Sessions.emplace_back();
213 ovrSession session = &g_Sessions.back();
214
215 // Initialize session, it will not be fully usable until a swapchain is created
216 CHK_OVR(session->InitSession(g_Instance));
217 if (pLuid)
218 *pLuid = session->Adapter;
219 *pSession = session;
220 return ovrSuccess;
221}
222
223OVR_PUBLIC_FUNCTION(void) ovr_Destroy(ovrSession session)
224{

Callers

nothing calls this directly

Calls 1

InitSessionMethod · 0.80

Tested by

no test coverage detected