-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windowless operation / DirectX integration #20
Comments
(Accidentally closed. Reopening) |
RichEdit has windowless D2D mode, something similar would be nice. A combination of ITextServices2::TxDrawD2D, ITextServices::TxSendMessage and ITextHost::TxInvalidateRect (+ other host methods you find necessary). Instead of (or in addition to) drawing to D2D context, provide a method to draw into a user specified DXGI surface, which can be shared with both D2D and D3D. A simple but limited option is to provide a windowless swap chain that can be plugged into DirectComposition. |
Looking into this one, an offscreen rendering mode should be a must-have feature on the component. |
Thanks for the comment! We're currently working on a DirectComposition solution where the host app can provide a visual that the WebView content will be rendered into and with explicit APIs for input. We don't plan on a D2D, DXGI Surface, or DXGI SwapChain based solution but let us know if there are issues with a visual based DirectComposition solution that don't work for you that would be solved by D2D/DXGI. Can you elaborate on the raw audio comment? Our current plan is for the WebView to produce audio directly without help from the host app. |
Well our use case is to render the webview over live video feed for graphics overlay production. |
Has there been any significant progress in this area since the last few comments? I'd love to get a WebView rendered on top of a game for its UI. Plugging it directly into D3D would be a really good solution. |
So for the API surface - the ability to ask for a 32-bit RGBA like surface to render to would allow post-render composition - so rendering pages with transparent backgrounds would be able to be composed onto any other surface types. Support for higher-color-bit counts with HDR rendering would be also beneficial into the future as more and more screens are getting higher than 10-bit color support - which would be useful as well. Extending the CaptureRender API to allow for flags to PNG would even be good enough for many of these cases - cause the rendering would typically not need to be 'realtime' for a lot of cases. Ideally, this should also work if the control is only showing a SVG (instead of a page) - with the alpha channel rendering preserved. |
Rendering into a DC would be great for my usage. |
Do you guys have an ETA on this? Btw, could we make it work with swapchain already? |
Any update on this? |
I've been experimenting with this (no success), learnings so far:
Not sure, if a valid combination of (I have no experience of Win32 API's before this, so there's reasonable chance that I did some error, and some of the above could in fact have worked... anyway, hopefully this helps if anyone else investigating) |
I use |
DXGI surface might be too limiting. Bitmap as electron provides would be more preferred in my opinion. |
Passing
... not this. To add another use case, https://github.com/OpenKneeboard/OpenKneeboard renders in VR as a compositor layer; SteamVR, OpenXR, Oculus, and Windows Holographic compositor layers (e.g. Windows.Graphics.Holographic.HolographicQuadLayer) do not have an HWND or any support for DirectComposition - just a Direct3D texture (or OpenGL or Vulkan, but there is existing interop there). |
My use case is similar to https://streamlabs.com/content-hub/post/introducing-browser-source-interaction-for-streamlabs-desktop that it redirects video and audio for offscreen composition, and support virtual mouse/keyboard/touch/stylus/voice inputs in the background. Support for transparent background is especially important for adding an overlay to a video composition using web technology. I want a way to enable DXGI capture, and if possible, an NDI source (with ARGB video and audio). |
I ended up taking the same approach but with C++/WinRT; outlined at #547 (comment) |
Please provide an API that doesn't require a HWND parent, something that integrates well with Direct2D, Direct3D and DirectComposition.
I.e. provide (or consume) a DXGI surface that I can display with the abovementioned APIs + a way to feed input to a WebView + a notification mechanism for visual updates.
AB#28491736
The text was updated successfully, but these errors were encountered: