3 ms·
Small comment: It's possible to stitch together UI/video/3D without dealing with the compositor, if you use child windows instead (or in wayland terms, a subsur
by game-of-throws 4y ago
Small comment: It's possible to stitch together UI/video/3D without dealing with the compositor, if you use child windows instead (or in wayland terms, a subsurface). On win32 at least, it's a much simpler approach.
- layer8 4y agoThe article mentioned scrolling. Do you get smooth scrolling with that approach, when the child window is conceptually embedded into a scrollable view? I guess you should, because the traditional Windows controls are technically all windows (HWND), but I wonder.
- raphlinus 4y agoI could probably have written this in a clearer way. Child windows like a proto-compositor in a way, just with more limitations. You can put video/3D/etc content in a child window, but there are serious tradeoffs. When it's in a scrolling container, either your scrolling implementation is built from child windows, or you're going to deal with less than perfect synchronization as you overlay a changing clip/translate for the embedded content with draws of the rest of your UI (this used to be a common problem in browsers). Modern compositor APIs have explicit transactions[1, 2] causing the various view changes to be applied at the same time. It's not that the problem can't be solved, it's that it's trickier than people imagine. And of course a Wayland subsurface is using the compositor. [1]: https://docs.microsoft.com/en-us/windows/win32/directcomp/basic-concepts#synchronization https://docs.microsoft.com/en-us/windows/win32/directcomp/ba... [2]: https://developer.apple.com/documentation/quartzcore/catransaction https://developer.apple.com/documentation/quartzcore/catrans...
- c-smile 4y agoI am participating now in such project - 3D CAD alike application: it renders 3D scene in Vulkan with Sciter rendering auxiliary UI on the same Vulkan surface. Sciter manages dockable widgets, property editors, scene tree logical representation, menus, etc. on top of 3D scene. Approach is explained here: https://sciter.com/sciter-and-directx/ https://sciter.com/sciter-and-directx/ You see there exactly 3D, video and GUI around.