-
I'd like to draw something that has to be rendered into a window of the Slint toolkit (Rust version of course). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
You need to do some native OpenGL code yourself. You can create a framebuffer with a texture in OpenGL (e.g. using the glow crate) and then use from_framebuffer to create a You can maybe also use into_framebuffer somehow. |
Beta Was this translation helpful? Give feedback.
-
So I thanks @asny, I figured this out now and the three-d scene ends in a slint Image component on the screen. I write a shortened version down here in case someone else needs this later. Please add suggestions if something is bad or wrong in the code below. I assume a width/height of 100 throughout the example. I hope I did not make mistakes when shortening this, but you should get the idea.
|
Beta Was this translation helpful? Give feedback.
So I thanks @asny, I figured this out now and the three-d scene ends in a slint Image component on the screen. I write a shortened version down here in case someone else needs this later. Please add suggestions if something is bad or wrong in the code below. I assume a width/height of 100 throughout the example. I hope I did not make mistakes when shortening this, but you should get the idea.