MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / Init

Method Init

samples/drivers/drivers/barebones/src/device_provider.cpp:10–22  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Purpose: This is called by vrserver after it receives a pointer back from HmdDriverFactory. You should do your resources allocations here (**not** in the constructor). -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

8// You should do your resources allocations here (**not** in the constructor).
9//-----------------------------------------------------------------------------
10vr::EVRInitError MyDeviceProvider::Init( vr::IVRDriverContext *pDriverContext )
11{
12 // We need to initialise our driver context to make calls to the server.
13 // OpenVR provides a macro to do this for us.
14 VR_INIT_SERVER_DRIVER_CONTEXT( pDriverContext );
15
16 // Init has been called. Let's just log to acknowledge. You'll see this
17 // in the logs (SteamVR hamburger menu > Developer > Web Console)
18
19 DriverLog( "Init called on MyDeviceProvider!" );
20
21 return vr::VRInitError_None;
22}
23
24//-----------------------------------------------------------------------------
25// Purpose: Tells the runtime which version of the API we are targeting.

Callers

nothing calls this directly

Calls 1

DriverLogFunction · 0.85

Tested by

no test coverage detected