-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
Off screen rendering #289
Comments
Most gtk-rs crate documents have search alias that you can just type with c functions. |
Did some experimentation on this, and opened the pull request for easier discussion (with code). Seems like this would be doable at least for Linux, need to investigate other platforms. https://github.com/blaind/wry/blob/headless/examples/headless.rs#L111 is an example to use together with the pull req, although the Event is currently a wrong one and only first two frames are being sent. |
@blaind Thanks for your attempt. When I was saying this need to do it yourself with tao window creation, I mean everyone can retrieve a raw handle (in this case gtk_window). You don't need to implement into the event loop. |
Allright, thank you for the information. I did a new iteration by implementing a It also seems that on Linux the |
I've been PoC'ing with a webview for Bevy 3D engine - repo can be found from here: https://github.com/blaind/bevy_webview/ The underlying logic is heavily based on wry, but without tao-window abstractions (see https://github.com/blaind/bevy_webview/blob/main/crates/headless_webview_engine/src/platform_impl/webkitgtk/mod.rs). Also extracted a "base" crate with traits (see https://github.com/blaind/bevy_webview/tree/main/crates/headless_webview). For headless operation, there was quite a bit of extra to implement on top of wry-logic. I wonder if there any long-term chance for getting this functionality (with similar or different design?) to be merged into wry? |
I think we can provide another method in WindowBuilderExtUnix trait for this kind of attribute. |
Hello
Thank you for contributing to this amazing project.
I find out that tao uses gtk and with gtk, we can use the following C codes in order to render the whole window into the pixels.
This approach can help us to enable off-screen rendering for wry (issue #391) feature for wry and then we can use wry in the field of 3D applications & games. (e.g html user interface in game ).
I could not find any rust function related to
gdk_pixbuf_get_from_window
am I miss something?
The text was updated successfully, but these errors were encountered: