Follow-up to #2395 (BloomView) / #5518.
Current state
BloomView now links and creates a real native render-surface view on every target (#5518): a child HWND on Windows, an NSView/UIView on macOS/iOS/visionOS, a GtkDrawingArea on GTK4, an android.view.View on Android (tvOS/watchOS are link-stability stubs). bloomViewGetHwnd(view) returns the platform's native handle.
But live rendering only works on Windows. The Bloom engine can only build its surface on an HWND (bloom_attach_hwnd, Bloom-Engine/engine#70). On the other platforms the view is created and a handle is handed out, but no renderer attaches to it yet.
Goal
Make a BloomView actually render a Bloom scene on every platform Bloom supports, not just Windows.
Work breakdown
Engine side (Bloom-Engine/engine) — ✅ landed in Bloom-Engine/engine#71
The engine exposes one platform-neutral ABI symbol bloom_attach_native(handle, w, h) (each platform interprets handle as its own NSView*/UIView*/ANativeWindow*/HWND) rather than distinct bloom_attach_nsview/uiview/surface names — the function manifest is shared and CI requires every platform to export every entry, so one symbol beats N stubs. A shared attach_engine() helper factors the wgpu bring-up out of every bloom_init_window (macOS was refactored onto it). TS exposes the named wrappers attachToNSView / attachToUIView / attachToSurface + attachToNativeView. Also added real cross-platform bloom_resize. Verified: macOS renders a scene end-to-end headless; iOS cross-compiles.
Perry UI side (PerryTS/perry)
Naming
References
Follow-up to #2395 (BloomView) / #5518.
Current state
BloomViewnow links and creates a real native render-surface view on every target (#5518): a child HWND on Windows, anNSView/UIViewon macOS/iOS/visionOS, aGtkDrawingAreaon GTK4, anandroid.view.Viewon Android (tvOS/watchOS are link-stability stubs).bloomViewGetHwnd(view)returns the platform's native handle.But live rendering only works on Windows. The Bloom engine can only build its surface on an HWND (
bloom_attach_hwnd, Bloom-Engine/engine#70). On the other platforms the view is created and a handle is handed out, but no renderer attaches to it yet.Goal
Make a
BloomViewactually render a Bloom scene on every platform Bloom supports, not just Windows.Work breakdown
Engine side (Bloom-Engine/engine) — ✅ landed in Bloom-Engine/engine#71
The engine exposes one platform-neutral ABI symbol
bloom_attach_native(handle, w, h)(each platform interpretshandleas its ownNSView*/UIView*/ANativeWindow*/HWND) rather than distinctbloom_attach_nsview/uiview/surfacenames — the function manifest is shared and CI requires every platform to export every entry, so one symbol beats N stubs. A sharedattach_engine()helper factors the wgpu bring-up out of everybloom_init_window(macOS was refactored onto it). TS exposes the named wrappersattachToNSView/attachToUIView/attachToSurface+attachToNativeView. Also added real cross-platformbloom_resize. Verified: macOS renders a scene end-to-end headless; iOS cross-compiles.NSViewMetal attach.UIViewMetal attach.GtkWidget→GdkSurface(X11/Wayland orGtkGLArea) bridge is still TODO.ANativeWindowattach (needs the Perry-sideSurfaceViewswitch below to produce the window).package.jsonfunction-manifest entries.Perry UI side (PerryTS/perry)
set_size_requestis done for GTK4,LayoutParams(Android).android.view.Viewto aSurfaceView/TextureViewand expose itsSurface(currentlybloomViewGetHwndechoes the registry token).embed-perry/(feat(windows): embed Bloom in a host window via bloom_attach_hwnd (Perry UI BloomView, #2395) Bloom-Engine/engine#70) with a build per target, and confirm a live scene renders inside a Perry UI app on each.Naming
bloomViewGetHwndto a platform-neutralbloomViewGetNativeHandle(with a deprecated alias) now that it returns NSView*/UIView*/GtkWidget*/etc.References
bloom_attach_native): feat(attach): host-surface attach path on all platforms (PerryTS/perry#5519) Bloom-Engine/engine#71 ✅ merged