Forum Discussion
knchaffin
7 years agoExplorer
wglDXRegisterObjectNV returns 0 but no error ( NV_DX_interop2 )
Has anyone successfully added NV_DX_interop2 functionality to a PC Win10 OVR SDK app with NVIDIA GTX 1080 GPU? Just to be clear, my goal is to be able to execute arbitrary GL code and have it writ...
volgaksoy
7 years agoMeta Employee
The Oculus provided textures internally use GL_TEXTURE_2D instead of GL_RENDERBUFFER type you're using in the wglDXRegisterObjectNV call. So we share the D3D resource over as a texture, and then in GL bind that texture as a framebuffer in GL. Once that's done, you also need to properly lock and unlock the resources when D3D is accessing them using wglDXLockObjectsNV and wglDXUnlockObjectsNV.
However, I think you should side step all of that, and avoid pushing the Oculus SDK provided textures thru the interop. Instead create your own textures and render targets in your own code. Share them between GL and D3D as necessary. Copy the contents of the GL render over to the final Oculus created DX render afterwards. The perf hit to copy over the contents would be minimal. That way you're not trying to make heads or tails of the Oculus SDK's textures.
However, I think you should side step all of that, and avoid pushing the Oculus SDK provided textures thru the interop. Instead create your own textures and render targets in your own code. Share them between GL and D3D as necessary. Copy the contents of the GL render over to the final Oculus created DX render afterwards. The perf hit to copy over the contents would be minimal. That way you're not trying to make heads or tails of the Oculus SDK's textures.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago