Hotrian / OpenVRDesktopDisplayPortal

Put your favorite Desktop Window directly into any OpenVR game!
Other
445 stars 97 forks source link

See Windows mouse pointer #36

Closed treyharris closed 7 years ago

treyharris commented 7 years ago

The last issue I mentioned—for mouse & keyboard games, it would be nice to be able to use the physical mouse as the pointing and clicking interface for the overlay. But like in the Steam desktop overlay (now—for a couple of months, this was not the case at least with the beta channel of the Steam client), the pointer doesn't appear when you move the mouse, though things like hover tips and feedback highlighting are obviously passed through.

Hotrian commented 7 years ago

The cursor doesn't appear? How so? The cursor you see in OVRDDP's overlay is not the actual desktop cursor, it is a sprite, but Full Interaction should move the physical desktop cursor. I will add the option in the future to capture the current desktop cursor sprite, but for now the cursor should always be visible from VR, regardless of input mode.

Hotrian commented 7 years ago

Oh, are you saying you want to be able to move the desktop cursor and have the sprite update in VR? This is probably possible.

Commenting from a mobile app that doesn't let me edit comments..

treyharris commented 7 years ago

Yes, I want to be able to move the real physical mouse and see the pointer move in the overlay. Capturing the correct cursor sprite would be nice too, but not strictly necessary.

Of course, without a way to toggle overlay interaction on and off without pointing the controller, this wouldn't be useful except for the screen and world bindings. You said you can observe but not capture controller button events, but since users would be using the mouse at this time anyway, that's probably not a big deal to use. Maybe something exceedingly unlikely to be a game function in every context (unlike the menu button)—say, a quick double-grip? (I would even appreciate that toggle also causing the controller view to lock in-world, as I could then use the controller to put the overlay where I want it, toggle interaction, then drop the controllers and use mouse and keyboard.)

Hotrian commented 7 years ago

This is now included in the source as of 3c5ed197bab9ef2c8d55a43fe2b74833c09b19c5 under "Additional Settings > Show Actual Cursor", and will be in v1.0.6, whenever that comes out :P Almost certainly within the next week or so.

Closing this for now.

treyharris commented 7 years ago

Just FYI because it might be something to look at: I enabled the accessibility option in Mouse Settings → Pointer Options "Show location of pointer when I press the CTRL key", and while the locator circle appears in Steam Desktop, it doesn't appear in a display portal.

Hotrian commented 7 years ago

Yes, this is because the SteamVR Desktop captures the whole desktop, where as OVRDDP currently supports only GDI Direct and GDI Indirect. GDI Direct captures from the application's display context directly and you will not see any special effects. GDI Indirect basically takes a screenshot of the desktop so it might show these special effects, but it is much slower. Once I implement the new API available in Windows 8 and 10 you should be able to see an exact replica of your desktop at full speed, as well as, of course, just a piece of your desktop (such as an application), though the Desktop Duplication API will require that the application being captured stays on top, like GDI Indirect.

Edit: API name redacted ;]

treyharris commented 7 years ago

Ah... that might explain, I think, why my framerate drops to noticeably juddering (haven't turned on the frame-rate warning overlay, but I'm guessing down to below 35 fps) when I have used the SteamVR Desktop and the OVRDDP overlay at the same time (since until the mouse capture is available, and since I have a 3440×1440 display that's impossible to read in the Desktop, I've been using the Desktop to locate the pointer and the overlay to read whatever it is I'm pointing at). If two different capture & renders are happening at once (in addition to whatever program the HMD is rendering to start with), I can see that making frame rate plummet.

IOW, looking forward to that next release. :-)