way-cooler / rust-wlc

[DEPRECATED] Rust bindings for wlc, the Wayland compositor library
54 stars 12 forks source link

Writing a 3D compositor using rust-wlc. #40

Closed alspore closed 8 years ago

alspore commented 8 years ago

I'm pretty new to rust, OpenGL, and wayland, so forgive me if this is super out of scope for this project. I've been aware of a 3D wayland window manager called motorcar for a while now, so after learning rust and a bit about wayland I have decided to look into programming my own 3D OpenGL window manager. I was wondering how one might go about creating an OpenGL root view that renders all child views. Thanks so much for your time, and for creating this library!

SnirkImmington commented 8 years ago

So you'll probably want to ask if this is possible with the wlc people. They do provide handles to the underlying wl_surfaces of their view handles, which will be needed for OpenGL, but something like this might need to be written directly using wayland.

We have been wanting to wrap the wayland stuff wlc provides but didn't want the overhead of needing some wayland-bindings crate, however, we can add this as an optional dependency. It's not as high-priority as the additions needed to match wlc 0.0.3 but it's on issue #25.

However, even if we add bindings to getting the wayland handles, I'm not sure you could do something that advanced using wlc. Motorcar looks super complicated and not the kind of first time Rust/wayland/OpenGL project.

Timidger commented 8 years ago

Adding on to what Snirk said, from what I saw of motorcar it looks to want to be a general purpose framework for what you want to do. However, since it seems to be written in C++ you'll either have to write the compositor in C++ or make a C-wrapper for the framework and then make a rust-wrapper that can talk to the C wrapper to ultimately talk to motorcar.

I suggest you also contact the maintainers of motorcar to get their input on this, but from I can see wlc will not provide enough tools for what you want to do.

alspore commented 8 years ago

Thanks for the quick reply! It seems I am in over my head. I guess this just means more I have more research to do!