Commit graph

10 commits

Author SHA1 Message Date
8278a080af fix: actually use staging_size in WindowState.generateGlyph 2025-09-23 22:14:29 +02:00
a9d4fed205 feat: support wide characters in win32 gui
closes #132
2025-09-23 22:14:29 +02:00
91eba39019
fix(win32 gui): prevent index out of bounds in d3d11.paint 2025-01-20 19:46:22 +01:00
Jonathan Marler
3e953981fe win32 gui: add Fonts type to get list of available fonts
Adds a Fonts type the render interface.  Here's an example of how
you could use this in `gui.zig`:

```zig
    const fonts = render.Fonts.init();
    defer fonts.deinit();
    const count = fonts.count();
    std.log.info("{} fonts", .{count});
    for (0..count) |font_index| {
        const name = fonts.getName(font_index);
        std.log.info("font {} '{}'", .{ font_index, std.unicode.fmtUtf16Le(name.slice()) });
    }
```
2025-01-17 16:19:19 +01:00
Jonathan Marler
7558a63819 win32 gui: decouple screen renderer from text renderer
I tried adding Andrew's TrueType renderer as an option, however, I
realized it doesn't work with zig 0.13.0, so it'll have to wait.

Until then here's the changes needed to decouple the screen/text rendering
which would make it easier to add more text renderers and just cleans
things up a bit more in general.
2025-01-15 21:16:51 -07:00
Jonathan Marler
ce068ee0dc direct3d: hoist flow types out, provide cell type, don't block GPU
Changes d3d11 to accept an array of cells to render that have already been
rendered to a texture and converted to texture coordinates.  This minimizes
the time we have to map the shader cell buffer which blocks the GPU from
using it.
2025-01-15 22:40:37 +01:00
Jonathan Marler
0f08b3930f win32 gui: fallback to non-debug d3d if create fails (requires sdk) 2025-01-14 23:37:28 +01:00
9cc5c9711b
fix(win32 gui): avoid a panic on invalid utf-8 2025-01-14 13:08:27 +01:00
Jonathan Marler
27f256a7c5 switch to a monochrome texture for the font rendering 2025-01-13 22:15:11 -07:00
Jonathan Marler
5b83619f7a win32 gui: replace D2D renderer with D3d11 shader 2025-01-13 05:06:57 -07:00