Jump to content
Happy Holidays! Limited Staff Responses: 1/20 - 1/31 ×

How do I integrate SRWorks SDK to another OpenVR projects?


bluekyu
 Share

Recommended Posts

Hello. I am developing a SRWorks sample in my C++ project (using open source engine).

 

The project is already using OpenVR SDK, but integration of SRWorks SDK does not works well.

(Note that, Unreal sample and C API samples work well)

 

I tried some codes, but failed:

1. Pre-init SRWorks: Crash in ViveSR_API.dll when creating a new window in the engine.

2. Post-init SRWorks after OpenVR init

   1) Set VR_INIT to true OR false for ID_SEETHROUGH: Crash by GL context

   2) Use "SeeThrough::InitType::BACKGROUND": Crash by GL context

   3) Threading for SRWorks parts: Rendering works, but VR submit does not work

 

Is there right usage when SRWorks is used with OpenVR?

Link to comment
Share on other sites

Yes. I tried to use below codes for SeeThrough module:

 

ViveSR_SetParameterBool(ID_SEETHROUGH, ViveSR::SeeThrough::Param::VR_INIT, true);ViveSR_SetParameterInt(ID_SEETHROUGH, ViveSR::SeeThrough::Param::VR_INIT_TYPE, ViveSR::SeeThrough::InitType::BACKGROUND);

 

Also, I did it in non-thread and multi-thread cases.

In non-thread (main thread), it caused crash on my GL draw call.

 

In multi-thread, crash does not happen, but HMD rendering becomes off (HMD shows black display and SteamVR does not show my application name.)

 

And I attached SRWorks log using SRLOG_LEVEL_MAX in non-thread.

(I created only ENGINE_SEETHROUGH module and did not start it.)

[Vive SRWorks] [2018-06-12 09:41:20] [LOG] ViveSR_Initial() success[Vive SRWorks] [2018-06-12 09:41:20] [LOG] SRWorks Version 0.7.5.0[Vive SRWorks] [2018-06-12 09:41:20] [LOG] CPU : Windows 8+[Vive SRWorks] [2018-06-12 09:41:20] [LOG] CPU GetMemory Total : 16298.000000[Vive SRWorks] [2018-06-12 09:41:20] [LOG] CPU GetMemory InUse : 6499.000000[Vive SRWorks] [2018-06-12 09:41:20] [LOG] GPU : GeForce GTX 1080 Ti[Vive SRWorks] [2018-06-12 09:41:20] [LOG] GPU driver : 39811[Vive SRWorks] [2018-06-12 09:41:20] [LOG] GPU memory usage : 3505.917969[Vive SRWorks] [2018-06-12 09:41:20] [LOG] GPU memory loading: 85[Vive SRWorks] [2018-06-12 09:41:20] [LOG] ViveSR_CreateModule() start[JSON] [2018-06-12 09:41:20] [LOG] found steam install path[JSON] [2018-06-12 09:41:20] [LOG] using device : LHR-98B80BC8[JSON] [2018-06-12 09:41:20] [LOG] using system : lighthouse[JSON] [2018-06-12 09:41:21] [LOG] found device config file : C:\Program Files (x86)\Steam\config\lighthouse\LHR-98B80BC8\config.json[JSON] [2018-06-12 09:41:21] [LOG] Cali_V2D_00000[JSON] [2018-06-12 09:41:21] [LOG] MIE_GCP_00000[JSON] [2018-06-12 09:41:21] [LOG] found steam install path[JSON] [2018-06-12 09:41:21] [LOG] using device : LHR-98B80BC8[JSON] [2018-06-12 09:41:21] [LOG] using system : lighthouse[JSON] [2018-06-12 09:41:21] [LOG] found device config file : C:\Program Files (x86)\Steam\config\lighthouse\LHR-98B80BC8\config.json[JSON] [2018-06-12 09:41:21] [LOG] Cali_V2D_00000[JSON] [2018-06-12 09:41:21] [LOG] MIE_GCP_00000[Vive SRWorks] [2018-06-12 09:41:21] [LOG] CM_MT1_MID0_00000[Vive SRWorks] [2018-06-12 09:41:21] [LOG] ViveSR_CreateModule() end[DEVICE_VIVE_HMD_DUALCAM_0] [2018-06-12 09:41:21] [LOG] M_MSCD_set_VRINT_1[DEVICE_VIVE_HMD_DUALCAM_0] [2018-06-12 09:41:21] [LOG] M_MSCD_set_VRINT_TYPE3
Link to comment
Share on other sites

Thank you! First of all, I just ran my project with those.

The crash did not happen and VR rendering worked well!

 

I will test SeeThrough and Depth module and will close this discussion if a issue does not exist.

 

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...