Forum Discussion
mmostajab
11 years agoHonored Guest
ovrHmd_AttachToWindow is not working in Qt's GLWidget.
I wanted to send the output directly to the oculus using the ovrHmd_AttachToWindow function as follows: if (!ovrHmd_AttachToWindow(hmd, (void*) Base::winId(), 0, 0)) { dprintf...
jherico
11 years agoAdventurer
"mmostajab" wrote:
It fixed my problem. I used the hmd->WinodwPos and hmd->Resolution to translate my output into HMD :)
That's good. But you should bear in mind that hmd->Resolution is the native resolution of the headset, regardless of the current resolution. If someone is for any reason running the Rift at something other than the native resolution, they will get a bad result from code that simply uses hmd->Resolution. This may become even more critical in the future as HMDs start supporting higher resolutions, perhaps even having native resolutions that some systems may not be able to support.
The correct solution is to iterate over all the screen devices on the system, and find the one which has a desktop position matching hmd->WindowPos and then query the system for that screen's current resolution. Obviously this isn't really critical if you're just experimenting or developing for your own use, but if you're planning on creating a distributable application, it's something you should make sure you get right.
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
- 1 month ago
- 5 years ago
- 9 years ago
- 2 years ago