Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
thewhiteambit's avatar
thewhiteambit
Adventurer
11 years ago

Desktop Duplication API throwing exception on Direct HMD

When using Desktop Duplication API
http://msdn.microsoft.com/en-us/library/windows/desktop/hh404487(v=vs.85).aspx


DxgiOutput1->DuplicateOutput

//throwing exception when in Direct HMD Mode

ovr_InitializeRenderingShim();

//or

ovr_Initialize();

//were called before


Everything is ok without Direct HMD, and also data can be aquired when ovr_Initialize(); is called after d3d-init. Grafix is nVidia Geforce 470gtx. Behaviour was observed in own Engines, but also with just integrating OVR-SDK in the Sample provided by Microsoft:

http://code.msdn.microsoft.com/windowsapps/Desktop-Duplication-Sample-da4c696a

4 Replies

  • Ok thx, was not sure if this was OK with your application. But I just retried and have seen your warning bubble now. So I am not the only one with the problem... hope there is a fix for this soon!
  • I got a related question to this and I hope you can lead me into the right direction.

    I'm working on Oculus support for a car simulator at our institute as part of my bachelor thesis. The car simulator software and the display window can be fully controlled by a tcl script language. I have successfuly written a plugin that allows me to control the display window via a c++ console application. I chose this approach because I want to leave the simulator software untouched.

    Now my idea was to have the Oculus sensor data processed to my needs and then send the screen adjustment command to the simulator. To get the desired view back to the oculus I wanted to put the simulator scene in full screen mode and mirror the screen to the Oculus.

    Because I see you already have experience with the screen mirroring approach, would you see using the Desktop Duplication API provided by Microsoft as a viable solution?
  • MS Desktop Duplication API works only on Windows 8, if that is no concern it you can implement it. But it is quiet complicated, because multi-threaded handling needs shared resources over multiple devices. The API itself is great and easy to use.

    I am working on an overlay, one could use with different existing software - this should work at least in windowed mode with wpf - this way one could use a virtual desktop in many other software :)