elvissteinjr / DesktopPlus

Advanced desktop access for OpenVR
GNU General Public License v3.0
467 stars 29 forks source link

Question: Web Based Content directly #35

Open chris-redbeed opened 2 years ago

chris-redbeed commented 2 years ago

I didn't found any settings in the Code or Applications itself: Is it possible to start a Web Window (open Webaddress) directly in the App?

Im currently looking for a Overlay System that can open "transparent" Webpages to display things in my Playspace/area.

elvissteinjr commented 2 years ago

Desktop+ currently doesn't render any web content and likely won't ever do it in the future. At least to me it's not really that desirable to pull in an entire web renderer into the app (releases are currently less than 4 MB total, a CEF build is many times of that to the point I consider it bloat).

What Desktop+ can display, is alpha transparency in window captures. But finding application windows that actually apply transparency in the supported way isn't easy. Electron supports transparent windows and those capture with alpha transparency as they should for example, but I've not been able to find a ready user-facing application for this task. Getting there from the Electron sample is as easy as setting "transparent" to true and "frame" to false for the BrowserWindow, but maintaining and getting something like that into an user-friendly fashion is a bit much for me. JS and web-dev isn't my thing, really. And that easy way isn't fully integrated either since it still goes through a desktop window, yeah.

TayouVR commented 2 years ago

OVR Toolkit does support both chroma keying and has an integrated web browser with support for transparency, but for in Desktop+ I could imagine using a blank electron app with hard coded url to load said website with transparency. I suppose someone, who has the time could put that on a repo or something for anyone to download and get running. Or Desktop+ could have plugins, so that a CEF implementation could be shipped seperately, but thats a whole other workload to deal with... although I think that could be quite useful.

elvissteinjr commented 2 years ago

I suppose I may look into CEF when I have time and see how much effort it would really be. The actual capture portion of the Graphics Capture window stuff is also pretty much standalone in its own DLL, so a similar approach wouldn't be too far fetched. But still, that's just theorizing. I don't want to give much of a promise there, but if there's really demand for it might be an idea to not outright ignore it. CEF just seems like a beast that is not fun to work with from the outside, but I might be wrong.

Chrome keying/general shader support is on my list actually, but I got my hands full on the UI revamp for now.

elvissteinjr commented 2 years ago

NewUI Preview 6 now has initial web browser support. The code still needs a bit of cleanup so I haven't put it in the repo yet, but you can already try it with the Steam version by switching to the "Desktop+ NewUI Preview + Browser" beta branch.

TayouVR commented 2 years ago

I'm definitely curious about how you ended up implementing it, will both try the branch on steam and probably scroll through the code as you push it. Although my C++ skills are severely lacking, so I'll have to see how well I understand it...