Commit graph

1416 commits

Author SHA1 Message Date
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
Stephen Gutekanst
14ec786c62 ecs: remove incomplete sparse storage implementation
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-10 13:24:27 -07:00
Stephen Gutekanst
53a1a2e9fd examples/gkurve: update to latest freetype API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-10 13:24:02 -07:00
PiergiorgioZagaria
112b837cae examples/gkurve: fixed logic for points inside polygon 2022-06-10 13:24:02 -07:00
PiergiorgioZagaria
c1b3996b63 examples/gkurve: support for UTF32 characters 2022-06-10 13:24:02 -07:00
PiergiorgioZagaria
98138dd2fa examples/gkurve: initial commit for resizable_label 2022-06-10 13:24:02 -07:00
David Vanderson
ade26b24b1 ditch setTimeout 2022-06-10 12:57:31 -07:00
David Vanderson
4eb872944a wait event stuff for wasm backend 2022-06-10 12:57:31 -07:00
David Vanderson
0f7c34a5ad review updates 2022-06-10 12:57:31 -07:00
David Vanderson
9354c178eb native: switch to setWaitEvent() 2022-06-10 12:57:31 -07:00
Jamie Brandon
15c71f5135 freetype: Avoid dereferencing null bitmap buffer.
For some characters (eg \r) the returned glyph will have .{.rows = 0, .width=0, .pitch = 0, .buffer = null}. In zig null[0..0] causes a panic rather than returning an empty slice.
2022-06-10 12:55:19 -07:00
Ali Chraghi
86053d9969 freetype: update upstream 2022-06-10 12:53:10 -07:00
Ali Chraghi
cdce9fb223 freetype: sync harfbuzz sources with upstream 2022-06-10 12:53:10 -07:00
Ali Chraghi
9c585693b1 freetype: find and fix bugs by fixing refAllDecls() 2022-06-10 12:53:10 -07:00
Ali Chraghi
2b7527b028 freetype:harfbuzz: 100% blob and 50% buffer binding 2022-06-10 12:53:10 -07:00
Ali Chraghi
d98bfab809 freetype: rename freetype_pkg to pkg 2022-06-10 12:53:10 -07:00
iddev5
772a821ce1 mach: wasm: Implement setShouldClose for wasm 2022-06-08 07:31:53 -07:00
iddev5
2d53b8bdfd examples: Do not return bool on update()
Also replaced all ``return false;`` usages with Engine.setShouldClose(true).
2022-06-08 07:31:53 -07:00
iddev5
40c0659cc9 mach: App.update will now return !void instead of !bool
In order to close the application, there is already
Engine.setShouldClose() which would roughly do the same thing.
2022-06-08 07:31:53 -07:00
dweiller
3234b6c0dd ecs: fix pointer invalidation in set/removeComponent 2022-06-07 19:26:40 -07:00
dweiller
997cf7d446 ecs: fix argument order in copy() calls 2022-06-07 19:26:40 -07:00
Ali Chraghi
82e1990009 freetype: init harfbuzz binding 2022-06-07 19:23:33 -07:00
Ali Chraghi
04a0a79ef6 freetype: ~99% Core-API Coverage
- breaking structure changes
- optimazed examples
- more tests
2022-06-07 19:23:33 -07:00
iddev5
db377459c4 mach: Listen to resize event for canvas and thus store window and
framebuffer size
2022-06-06 00:37:38 -07:00
iddev5
99dc10e58a mach: wasm: Implement mouse press, release, motion and scroll events 2022-06-05 13:34:24 -07:00
iddev5
efe90fc64f mach: Rename scroll -> mouse_scroll and use f32 for offsets 2022-06-05 13:34:24 -07:00
David Vanderson
a2a6c2a288
mach: add mouse motion and mouse button events (#325)
* add mouse motion and mouse button events
* add scroll events
* switch from button/action to mouse_press and mouse_release events
2022-06-04 06:29:23 -07:00
iddev5
7b395759b7 examples, shaderexp: update to new options and size limit API 2022-06-01 23:45:56 -07:00
iddev5
176554fe4d mach: Make size limits part of runtime options (mach.Options)
Removed method Engine.setSizeLimits and added two new fields to
mach.Options called ``size_min`` and ``size_max`` which does the same
thing.
2022-06-01 23:45:56 -07:00
iddev5
ed0e6f5c61 mach: Added runtime application options
Reused mach.Options for run time options. It is set with
Engine.setOptions function. ``pub const options`` on top level App has
no effect and will be ignored completely.

Added a blank struct StartupOptions which would be used for startup time
options in future. Currently they aren't used for anything.
2022-06-01 23:45:56 -07:00
iddev5
01eee68f5b shaderexp: avoid using engine.internal and update to new engine API 2022-06-01 23:45:56 -07:00
iddev5
03491dfd27 examples: update to new Engine API 2022-06-01 23:45:56 -07:00
iddev5
50fe649ab1 mach: merge and remove the extra layer of indirection caused by Core and
GpuDriver

Core and GpuDriver both are merged into one type called Platform. Also
previously the fields and methods which were called as
``engine.core.field`` will now be ``engine.field`` i.e an extra layer is
removed.
2022-06-01 23:45:56 -07:00
David Vanderson
3961073084
{mach,examples}: followups to getWindowSize / getFramebufferSize (#322)
* followup to window size saving, getWindowSize and getFramebufferSize no longer return errors
* updated the examples
2022-05-31 11:39:53 -07:00
Release automation
6bfb16554a gpu-dawn: update to latest binary release 2022-05-31 18:14:26 +00:00
Stephen Gutekanst
85ce4b22bd gpu-dawn: update macOS binary check from -gnu to -none ABI
Reflecting the breaking change in latest Zig master.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 10:28:27 -07:00
Release automation
ee7eca280c gpu-dawn: update to latest binary release 2022-05-31 12:46:56 +00:00
Stephen Gutekanst
322ead9218 CI: ZIG_VERSION=0.10.0-dev.2439+c84f5a5f9 ./dev/update-zig.sh
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 05:02:04 -07:00
Stephen Gutekanst
1af3ae02bf dev: CI: keep string terminator when updating Zig version for Windows
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 05:01:34 -07:00
Stephen Gutekanst
1eab0539d1 CI: correct M1 runner Zig version
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 04:11:43 -07:00
Stephen Gutekanst
c2111e0691 CI: ZIG_VERSION=0.10.0-dev.2439+c84f5a5f9 ./dev/update-zig.sh
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 03:39:45 -07:00
Stephen Gutekanst
7fb3e071d4 dev: CI: correct automated Zig version updates for Windows
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 03:39:26 -07:00
Stephen Gutekanst
539b643267 CI: rename macos-gnu target -> macos-none
Reflecting breaking change in latest version of Zig

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 03:24:34 -07:00