Commit Graph
175 Commits
Author SHA1 Message Date
meehl 6f0eef7cf8 Get rid of unwraps 2026-08-27 18:02:24 +02:00
meehl 8cfc82d668 Construct wgpu::VertexBufferLayout directly from Vertex 2026-08-27 17:48:17 +02:00
meehl 9d45b78d64 Use channel to handle async image load results in texture manager 2026-08-27 16:56:03 +02:00
meehl 692e530867 Add profiling scope for call to OnInit 2026-08-27 16:34:40 +02:00
meehl 4e67aa72c0 Acquire context reference after argument validation in image_handle_load
luaL_error can perform a long jump and never return. `drop` might not
get called on the AppDataRef, leaving it permanently borrowed.
2026-08-27 15:31:03 +02:00
meehl ac8cf3946e Remove TODO comment 2026-08-27 13:00:43 +02:00
meehl 49fab3c787 Use constant for number of texture slots in batch 2026-08-27 12:59:23 +02:00
meehl 93ce072d40 Remove unnecessary binding array size constant in shader 2026-08-27 12:43:29 +02:00
meehl 1f5e30ae5a Decouple anchor offset from parley alignment 2026-08-26 17:59:01 +02:00
meehl d217af94c3 Pass scale factor to layout builder.
This means `parley::Layout`'s internal coordinates are now in physical
space.
2026-08-26 17:34:11 +02:00
meehl fe9434e4f0 Warm glyph cache for correct scale factor 2026-08-26 16:16:14 +02:00
meehl f0be43cbdd Add helper for iterating glyph runs 2026-08-26 15:51:42 +02:00
meehl a678c8148d Clean up glyph rasterization 2026-08-26 14:41:32 +02:00
meehl 963a9ba1d1 Add comments about glyph baseline offset 2026-08-26 11:59:01 +02:00
meehl e6c5ec3d42 Move font style cache into separate file 2026-08-26 11:18:16 +02:00
meehl 8f98a9c8f1 Store size instead of rect for cached glyphs.
Their origin is always at (0.0, 0.0).
2026-08-26 10:24:13 +02:00
meehl a50ea4cdaf Introduce new coordinate space for glyph positions within a layout 2026-08-25 12:11:49 +02:00
meehl 7b925876a5 Cleanup of UV space handling 2026-08-25 10:46:12 +02:00
meehl 8d17f8e64f Use euclid::Scale to convert between physical and logical coord spaces 2026-08-24 23:57:19 +02:00
meehl 8ba72fd7df Cull draw command if shape does not intersect viewport. 2026-08-24 11:41:57 +02:00
meehl 2bbfd14c1b Add profileing scope around OnFrame and remove mut ref to context 2026-08-24 10:48:31 +02:00
meehl 99dd50de62 cargo update 2026-08-24 10:38:51 +02:00
meehl 6224a1b0a4 Lint 2026-08-24 10:24:51 +02:00
meehl 8cf5110eb2 Fix trailing whitespaces being ignored by string width query 2026-08-24 09:46:33 +02:00
meehl 493a2ba9cf Fix typo 2026-08-24 08:58:00 +02:00
meehl cc6de120f2 Refactor context handling and redraw requests
Remove unsafe pointer shenanigans and give Lua instance ownership over
`Context`. Event handlers now directly mutate Context instead of using a
shared app state which is then hooked up to Context via unsafe pointers.
The removal of a shared state means stages (previously called "modes")
are now responsible for keeping their own internal state.

Additionally, clean up draw request handling and module hierarchy.
2026-08-23 23:55:43 +02:00
meehl 337e876571 Fix off-by-one error in batcher 2026-08-23 15:24:14 +02:00
meehl d4ca16f07e Remove unnecessary Box around Context 2026-08-20 10:50:30 +02:00
meehl 6fe15c63fe DrawCommandRecorder::finish() doesn't need mutable reference 2026-08-18 11:06:38 +02:00
meehl 1cd62c2b1c Fix absolute positioning of text 2026-08-18 11:04:34 +02:00
meehl d43a1cf392 Hash draw commands directly from their byte representation 2026-08-18 10:58:06 +02:00
meehl e5bd0157d3 Update dependencies 2026-08-18 09:54:21 +02:00
meehl 43ef18c2e3 Align text with physical pixel grid to reduce blurriness 2026-08-16 11:08:45 +02:00
meehl 4d6c258932 Major renderer refactor
Replace old per-mesh bind group model with a better batching schema
built around wgpu's TEXTURE_BINDING_ARRAY support. Each batch now
holds multiple textures. Vertex and index buffers are now only set once
per frame. Massively improves rendering performance.
2026-08-16 01:25:22 +02:00
meehl 3fc87339ca Refactor draw command recording.
Remove distinct draw primitives and unify them into one shared form.
2026-08-15 19:19:55 +02:00
meehl a6d18a320c Fix comment 2026-08-15 19:19:34 +02:00
meehl e20a28fef7 Use layered font atlas.
Add layers instead of growing in height as more and more glyphs are
added. This allows us to return normalized UV coordinates since the
dimensions of each layer stay the same.
2026-08-15 15:49:25 +02:00
meehl b48edb72e1 Clean up return values of some API functions 2026-08-12 21:05:34 +02:00
meehl e43da1b9e8 Lint 2026-08-12 20:46:43 +02:00
meehl 99fc9f608e Improve performance of image handle access in API draw calls.
Use raw Lua C API to store image handles in Lua userdata instead
of using `mlua::UserData`. `mlua` wraps UserData in a special way
to maintain Rust safety guarantees which prevents direct access
of the underlying data from a raw Lua state.
The `DrawImage` and `DrawImageQuad` API calls used a workaround to
access the underlying image handle before which added significant
overhead. The overhead is eliminated by manually constructing the
userdata metatable for `ImageHandle` at the cost of weaker safety
guarantees.
2026-08-12 18:03:41 +02:00
meehl c1d91768bb Improve parsing of color escapes 2026-08-12 14:37:01 +02:00
meehl 4c581f92a8 Fix color escape regex 2026-08-12 14:10:00 +02:00
meehl a2afd2de54 Upgrade parley to v0.11 2026-08-11 23:17:58 +02:00
meehl a1cea10218 Upgrade wgpu to v30 2026-08-11 20:30:21 +02:00
meehl cee6f848ea Upgrade dds to v0.2 2026-08-11 19:26:24 +02:00
meehl 5c44328e16 Upgrade mlua to v0.12.0 2026-08-11 17:37:53 +02:00
meehl 6b6098d331 chore: Release rusty-path-of-building version 0.2.18
Release / create-release (push) Successful in 8s
v0.2.18
2026-05-29 15:09:23 +02:00
meehl 69d70e4712 Update CHANGELOG 2026-05-29 15:08:27 +02:00
meehl 32fd954952 Raise max_texture_array_layers requirement to support new gem tooltips 2026-05-29 15:02:35 +02:00
Aleksandr Timofeev 40ea4445cd Fix doubleclick handling (#49) 2026-05-24 21:11:19 +02:00