You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create a slint app where I can control which parts are rerendered (damaged). This is because it is a pen drawing app and I want e-ink devices to render only the pen strokes. I am aware this is not supported by slint directly atm (#3190) but shouldn't it be possible to use the raw window handle?
I render the pen strokes via opengl (femtovg::renderer::opengl::OpenGL) via window.set_rendering_notifier. Now instead of rerendering this on rerender request I thought I can do this on input event and then use wayland directly
// code that
surface.damage_buffer(x,y,w,h);
surface.commit();
This doesn't work though and I think it is because slint did not change the underlying buffer unless request_redraw is called? But this also makes the compositor rerender the whole window. Could I get the surface buffer somehow and write my pen strokes directly inside? I am blocked by this and maybe on the wrong track. Is there any way I could accomplish my goal? If not: I would be happy to contribute to slint to make this possible but I would need some hints where and how this should be added...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to create a slint app where I can control which parts are rerendered (damaged). This is because it is a pen drawing app and I want e-ink devices to render only the pen strokes. I am aware this is not supported by slint directly atm (#3190) but shouldn't it be possible to use the raw window handle?
I render the pen strokes via opengl (
femtovg::renderer::opengl::OpenGL
) viawindow.set_rendering_notifier
. Now instead of rerendering this on rerender request I thought I can do this on input event and then use wayland directlyThis doesn't work though and I think it is because slint did not change the underlying buffer unless
request_redraw
is called? But this also makes the compositor rerender the whole window. Could I get the surface buffer somehow and write my pen strokes directly inside? I am blocked by this and maybe on the wrong track. Is there any way I could accomplish my goal? If not: I would be happy to contribute to slint to make this possible but I would need some hints where and how this should be added...Beta Was this translation helpful? Give feedback.
All reactions