rust-windowing/raw-window-handle

With wayland, how can one access the shm?

john01dav opened this issue · 1 comments

According to this, it looks like one needs a WlShm object in order to display data on a window without the use of hardware acceleration. When looking through other code, such as minifb's, this assertion seems to be supported. It also appears to be the case that it is not possible to access this object with with what is exposed right now (just the surface and display). Is there some way to access this that I am not seeing? This is entirely possible as I'm not that familiar with the Wayland API.

You use your display. Connect to environment, create a wayland queue for you and create wl_shm on it for you to work with. Then when user calls to you, you should display it and wait for server replies. Also, you use dispatch_pending on that queue in particular.