Cloudef / wlc

High-level Wayland compositor library
MIT License
331 stars 58 forks source link

Exposed api to grab pointer texture #253

Closed Enerccio closed 7 years ago

Enerccio commented 7 years ago

Provides a way to get either custom texture surface from client or default texture from render

Cloudef commented 7 years ago

What exactly is the use case for this?

Enerccio commented 7 years ago

well if you render everything yourself, you do need a way to grab the surface of the pointer (and the default render texture)

Enerccio commented 7 years ago

Personally I use it here: https://github.com/Enerccio/nyarlathotep-wm/blob/master/src/render.c#L401

Cloudef commented 7 years ago

If you want to render everything yourself. I would probably instead work on making this plugable https://github.com/Cloudef/wlc/blob/master/src/platform/render/render.c#L142-L150 so you can replace the renderer itself instead of clearing and drawing everything again.

ammen99 commented 7 years ago

@Cloudef The compositor doesn't have to render everything again, if you want to do custom rendering, you can set the output mask to 0.

Enerccio commented 7 years ago

@Cloudef I looked at that, but that does actual rendering, but not the order of view render nor anything else. which is why I opted to actually render everything afterwards

I also tried to have custom renderer api (it's master of my fork actually) but for some reason, if I had empty render view, I would get black texture later when rendering myself

AND, even if I did have custom renderer, I still would need the api to grab the pointer because that is not covered by render (only default one is)

Enerccio commented 7 years ago

Here is the exposed api for render but I am not sure if it is in state to PR: https://github.com/Enerccio/wlc/