Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

scene: add a way to render arbitrary textures #3161

Closed
emersion opened this issue Sep 2, 2021 · 0 comments · Fixed by #3207
Closed

scene: add a way to render arbitrary textures #3161

emersion opened this issue Sep 2, 2021 · 0 comments · Fixed by #3207

Comments

@emersion
Copy link
Member

emersion commented Sep 2, 2021

Some compositors like Sway need to render arbitrary textures. This includes use-cases such as:

  • Titlebar textures
  • Saved surface buffers for atomic layout transactions

The scene-graph API doesn't yet allow to do this. Potential solutions include:

  • Add a new TEXTURE node type, which takes a wlr_texture. Probably the most straightforward, but ties the node to a specific renderer and doesn't allow for direct scan-out.
  • Add a new BUFFER node type, which takes a wlr_buffer. The scene-graph would be responsible for uploading/importing the buffer as a texture. However, this potentially duplicates the work with wlr_surface's client buffers in the case of displaying a saved surface buffer.
  • Add a new CUSTOM node type, which takes an arbitrary rendering function and the extents of the node. This would allow compositors to still use the scene-graph even when they do custom rendering (e.g. 3D effects). This doesn't allow direct scan-out and could go overboard.
emersion added a commit to emersion/wlroots that referenced this issue Sep 20, 2021
This new scene-graph node displays a wlr_buffer.

Closes: swaywm#3161
emersion added a commit to emersion/wlroots that referenced this issue Sep 20, 2021
This new scene-graph node displays a wlr_buffer.

Closes: swaywm#3161
emersion added a commit to emersion/wlroots that referenced this issue Sep 20, 2021
This new scene-graph node displays a wlr_buffer.

Closes: swaywm#3161
emersion added a commit to emersion/wlroots that referenced this issue Sep 21, 2021
This new scene-graph node displays a wlr_buffer.

Closes: swaywm#3161
emersion added a commit to emersion/wlroots that referenced this issue Sep 22, 2021
This new scene-graph node displays a wlr_buffer.

Closes: swaywm#3161
bl4ckb0ne pushed a commit that referenced this issue Sep 22, 2021
This new scene-graph node displays a wlr_buffer.

Closes: #3161
WillPower3309 pushed a commit to wlrfx/scenefx that referenced this issue Jul 11, 2023
This new scene-graph node displays a wlr_buffer.

Closes: swaywm/wlroots#3161
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

1 participant