----------------------------------------------------------------------------- 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). -----------------------------------------------------------------------------
| 8 | // You should do your resources allocations here (**not** in the constructor). |
| 9 | //----------------------------------------------------------------------------- |
| 10 | vr::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. |
nothing calls this directly
no test coverage detected