Skip to content

add screen buffer. Add ime events. Add safe area support. Add vertex coloring - #411

Open
Ughuuu wants to merge 50 commits into
dimforge:masterfrom
Ughuuu:balaur-hooks
Open

Ughuuu wants to merge 50 commits into
dimforge:masterfrom
Ughuuu:balaur-hooks

Conversation

@Ughuuu

@Ughuuu Ughuuu commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Implement features needed for Balaur Engine

…ge through it

A WebGPU canvas reports premultiplied alpha first, so `alpha_modes[0]`
picks it and the browser blends every pixel against the page. Nothing
downstream sets alpha: the post-processing pass clears to transparent to
mark empty background, so the whole frame arrives with a = 0 and the UI
appears to bleed into the scene.

A window on macOS or Windows lists Opaque first and never noticed, and
the offscreen path has no surface at all -- which is why screenshots
looked right while the browser did not.

Prefer Opaque where the surface offers it.
… on Apple browsers

A page that supplies the canvas owns its layout: kiss3d no longer forces
html/body to 100% with overflow hidden there, which had killed the page's
scrolling. egui modifiers now come from the event that carried them rather
than from key states polled once a frame, so a chord tapped inside one
frame still matches; ⌘ is the command key in a browser on an Apple
platform, and a key released while ⌘ is held gets the keyup macOS never
sends. Most of this landed mid-edit in 25602cd; this restores the Key
import it lost and formats.
@Ughuuu
Ughuuu marked this pull request as ready for review September 5, 2026 05:56
The renderer cleared its shapes right after drawing them, so a host that
skipped its pass painted nothing. Drop them when the next pass begins
instead: identical for a host that draws every frame, and it lets one
redraw its UI only when something changed.
A mesh had positions, normals and texture coordinates and nowhere to put
the colors a glTF's COLOR_0 carries, so a loader had to drop them and a
material had nothing to bind.

Optional, like the skin and the morph deltas beside it: a mesh without
colors allocates no buffer and draws exactly as before. set_colors pads a
short list with opaque white, and colors_buffer uploads on demand for a
material that binds its own vertex layout.
@Ughuuu Ughuuu changed the title add screen buffer. Add ime events. Add safe area support add screen buffer. Add ime events. Add safe area support. Add vertex coloring Sep 6, 2026
rustfmt the film-chain block

a render target remade when its format changes, not only its size

The film-stage post chain reuses the ping-pong pair at Rgba16Float. `resize`
compared only the extent, so the pair stayed at the surface format and the
seeding copy failed validation: source and destination were not
copy-compatible.
Ughuuu and others added 16 commits September 7, 2026 16:04
A pass reports a cursor in `platform_output`, and nothing read it: the
resize shape over a panel seam, the caret over a text field and the
pointing hand over a link were all requested and dropped. `end_frame`
keeps the icon, `finish_egui_pass` applies it through a new
`Canvas::set_cursor_icon`, and only a change is set, because setting one
is a hop to the main thread.
add_image, add_image_pixelated and add_image_with_color_space are a
handful of combinations, and a caller reading its settings out of a file
cannot pick one without giving the rest up. TextureSampling carries
wrapping per axis, a filter per magnification, minification and mip
level, anisotropy, the colour space and premultiplied alpha, and
add_image_sampled takes it.

Anisotropy is clamped rather than passed on: wgpu aborts the process on a
sampler whose filters do not match it. Premultiplication scales an sRGB
texture in linear light, which is where the fringe it removes lives.

Update mod.rs
sebcrozet and others added 23 commits September 13, 2026 09:08
…heir own buttons

The desktop table missed CapsLock, IntlRo, ContextMenu and NumpadEqual, and
the web table missed F13-F24, the locks, the international keys, the media,
browser and launch keys, and the IME keys. Back and Forward folded into one
button on desktop; they are Button4 and Button5, as on the web.
Window::wait_events(timeout) pumps the window system with a timeout
instead of polling it, queueing what arrived for events() without
drawing, and answers whether anything came. Window::waker() hands out
a Waker whose wake() ends that wait from any thread, through the event
loop's proxy. The web and iOS own their loops, so there it polls.
winit's Focused becomes WindowEvent::Focus, which was declared and never
sent. Occluded, and an Android activity suspending or resuming, become
WindowEvent::Iconify.
WindowEvent::LowMemory is new: winit's memory_warning on iOS and
Android. iOS now passes suspended and resumed on as Iconify, as Android
does, through one lifecycle queue poll_events drains on every native
target.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants