Commit graph

1608 commits

Author SHA1 Message Date
iddev5
6ed04c1e65 mach: Implement basic URI parser for resource system 2022-06-24 10:07:16 -07:00
iddev5
6b64c865bf mach: build: Install folders containing resources as a build step 2022-06-24 10:07:16 -07:00
dweiller
fa5afee5bc ecs: allow components to have type void 2022-06-18 20:56:36 -07:00
Ali Chraghi
52a67b1809 freetype/harfbuzz: implement freetype integration functions 2022-06-18 07:59:10 -07:00
Ali Chraghi
ef7904bf27 freetype: improve build system 2022-06-18 07:59:10 -07:00
Ali Chraghi
997328ddc6 freetype/harfbuzz: shape_plan binding 2022-06-18 07:59:10 -07:00
Ali Chraghi
58d10a816a freetype/harfbuzz: shape and partial shape_plan binding 2022-06-18 07:59:10 -07:00
root
09a8b1afac freetype/harfbuzz: make Feature and Variation externed
to be used as actual type, not a handler
2022-06-18 07:59:10 -07:00
root
158d8a6c43 freetype/harfbuzz: partial font binding 2022-06-18 07:59:10 -07:00
David Vanderson
43bff35d2c
mach: mouse cursor support (#352)
adds mouse cursor support for standard cursors

Co-authored-by: Stephen Gutekanst <stephen.gutekanst@gmail.com>
2022-06-15 21:53:55 -07:00
Vulfox
f5affbe7ae glfw: submodule path fix for subrepo 2022-06-15 06:59:56 -07:00
Caleb Gingles
e87d278f45
glfw: make MouseButton directly accessible, to match GLFW callback signature (#353) 2022-06-14 20:03:26 -07:00
Ali Chraghi
1e44df4607 freetype/harfbuzz: compelete face binding 2022-06-14 19:53:29 -07:00
Ali Chraghi
2b325e9c4b freetype: rename OutlineFuncs* to Funcs* 2022-06-14 19:53:29 -07:00
Ali Chraghi
4e3bbf694b freetype: remove castVec 2022-06-14 19:53:29 -07:00
Ali Chraghi
5d533a8e3a freetype::harfbuzz: complete common binding 2022-06-13 09:22:26 -07:00
Ali Chraghi
128cf8098c freetype: use u32 instead of usize 2022-06-13 09:22:26 -07:00
dweiller
dd4d741aed ecs: use std.mem.alignForward to calculate padding 2022-06-12 08:02:53 -07:00
dweiller
f6d29e7669 ecs: fix padding and data copy in setCapacity() 2022-06-12 08:02:53 -07:00
dweiller
390b8bd922 ecs: fix appendUndefined() off-by-one error 2022-06-12 08:02:53 -07:00
Stephen Gutekanst
3549f6bc4d glfw: update Linux system SDKs to include libxkbcommon-dev headers
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
35a9b45e59 glfw: prepare build system to support runtime Wayland/X11 detection
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
bdc12b367d glfw: README: update usage example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
49f5a26823 glfw: README: mention that we are now tracking glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
c45a717a38 glfw: add TODO about glfw@master custom allocator API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
21307a9d1d glfw: update time documentation to glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
24f4a9d1c3 glfw: update key documentation to glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
5b4b31de13 glfw: update core APIs to glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
2db01e1a32 glfw: update native APIs to glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
199a3dce78 glfw: update windowing API to glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
1dd27fd904 glfw: update monitor API to glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
174d244433 glfw: update cursor API to glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
4f61a4e3c6 glfw: update build system to glfw@master
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
131caa4cb7 glfw: ensure upstream submodule is cloned
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
214d4cfd6a glfw: upgrade to GLFW@master; add upstream submodule https://github.com/hexops/glfw
This upgrades us to the latest master (pre-release) version of GLFW which has our patches
for undefined behavior in Zig, effectively moving us off of our temporary fork. We now track
GLFW upstream at the revision documented in https://github.com/hexops/glfw/blob/main/VERSION

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Co-authored-by: Cai Bingjun <1945458160@qq.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
3dd8d028d9 glfw: stop vendoring upstream sources
Moving to the same model we use elsewhere: we now have https://github.com/hexops/glfw
which is a tiny repository with only the sources needed to compile/build/test GLFW on
every platform. It's just the upstream repository at a specific commit, recorded in
the `VERSION` file.

Helps hexops/mach#343

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
iddev5
47286508e3 mach: wasm: Implement fullscreen support for browser platform 2022-06-11 16:00:02 -07:00
iddev5
3dc131d4fa mach: Implement fullscreen window support for native platforms (glfw)
This feature remembers the last position of window before turning to
fullscreen.
2022-06-11 16:00:02 -07:00
iddev5
d3feaed383 glfw: Window: use u32 values for params in setMonitor method 2022-06-11 16:00:02 -07:00
Ali Chraghi
1c6e796df6 freetype: increase LoadFlags max size 2022-06-11 15:53:54 -07:00
Ali Chraghi
c02a3fbaf4 freetype::harfbuzz: complete buffer binding 2022-06-11 15:53:54 -07:00
Ali Chraghi
ffc7c3aa68 freetype: fix function namings
some functions should start with `get`
2022-06-11 15:53:54 -07:00
Stephen Gutekanst
1c0930b404
README: fix animated image widths 2022-06-11 00:55:51 -07:00
Stephen Gutekanst
6b886ee905
README: clean up / fix image width / dark theme 2022-06-11 00:53:50 -07:00
Stephen Gutekanst
c5432a9353 mach: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-10 16:56:40 -07:00
Stephen Gutekanst
70283bfcb4 ecs: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-10 16:56:12 -07:00
Stephen Gutekanst
7d7eb807f8 freetype: fix failing test / do not return pointer to stack
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-10 13:42:52 -07:00
Stephen Gutekanst
80157a99fc freetype: update upstream to include OT sources
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-10 13:42:14 -07:00
Stephen Gutekanst
334ed5c25f ecs: switch from ArrayList per-table-per-component-set -> single-[]u8-per-table
This switches our ECS over to manually managed memory (1 `[]u8` per archetype table,
with multiple column arrays packed into it - dealing with padding/alignment ourselves)
rather than the prior 1 `ArrayList(Component)` per component in an archetype table.

This idea was discussed in depth in [#ecs:matrix.org](https://matrix.to/#/#ecs:matrix.org)
(thanks Levy!) Notable advantages from my POV:

1. This means we don't need an `ErasedComponentStorage` interface, which is nice.
2. It means component storage does not have to have a Zig type. It could e.g. in theory enable
   the ECS to be usable from other languages (C, WebAssembly plugins, etc.) with component types
   defined in those languages in the future.
3. It reduces some overhead `ArrayList` has: slice ptr+len+capacity integers per component
   array per table
4. It guarantees component arrays are contiguous memory, rather than relying on the allocator
   to hopefully provide that (may not hold true in multi-threaded large-allocation situations.)
5. It means we could easily optimize for tables that have very few components by allocating exact
   memory for them (could've done this with `ArrayList` too, but now it's more likely the
   allocation are larger and thus more reusable by future archetype tables.) This could be quite
   important because one can imagine ending up with many small archetype tables.

Overall seems like the right thing to do, so we're doing it.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-10 13:24:27 -07:00
Stephen Gutekanst
5fd5638df0 ecs: add pkg declaration, remove static library
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-10 13:24:27 -07:00