Commit graph

18 commits

Author SHA1 Message Date
Ali Chraghi
7c0b796315 engine: init device 2023-08-04 18:28:10 -07:00
Ali Chraghi
c26cfec0b6 update to latest mach-core API 2023-08-02 20:34:15 -07:00
Stephen Gutekanst
4ebf238c5e mach: use a minimal core App, with a module implementing everything
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-27 09:29:47 -07:00
Stephen Gutekanst
f41b1b4f7b mach: use type safe module wrapper/helper
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-27 09:29:47 -07:00
Stephen Gutekanst
353cf6144b mach: update to latest ECS module layout
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-27 09:29:47 -07:00
Stephen Gutekanst
85ffb37156 mach: handle exit via module globals
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-27 09:29:47 -07:00
Stephen Gutekanst
f153133c30 {mach,ecs}: pass World to ECS event handlers
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-27 09:29:47 -07:00
Stephen Gutekanst
15e6f81df8 mach: prepare to handle ECS init via modules
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-27 09:29:47 -07:00
Stephen Gutekanst
2879ad58b0 ecs: replace world.tick() with generic world.send(.tick) message passing
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-27 09:29:47 -07:00
Stephen Gutekanst
3ff4bcc2a3 mach: finish splitting Core and Engine
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
9bbada90b2 {mach,core}: move core sources to libs/core
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
8082228186 mach: eliminate heap allocation of Core
Prior to this change `mach.Core.init` would heap allocate the structure, returning `*Core`:

```zig
app.core = try mach.Core.init(allocator, .{});
```

This was obviously not ideal, but wasn't possible to eliminate before due to how Core was
entangled with the platform abstraction. Now that it has been removed, we can reduce Core
initialization to take a `*Core` to initialize. In practice this means initialization looks
something like this:

```zig
try mach.Core.init(&app.core, alloctor, .{});
```

Or more simply:

```zig
try app.core.init(allocator, .{});
```

And we eliminate the `*Core` allocation entirely in most cases.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-17 09:49:40 -07:00
Ali Chraghi
10d5f344e3 {glfw,mach}: remove dead code 2023-01-15 08:31:26 -07:00
Ali Chraghi
1d7cd4be80 mach: fundamental changes
- Core doesn't depend to `App` anymore
 - `setOptions` has replaced with some new functions (`setTitle`,
   `setSize`, etc)
   - and more
2023-01-12 01:54:48 -07:00
Stephen Gutekanst
c97bcdde0a mach: improve compatibility with self-hosted compiler
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-08 07:26:30 -07:00
Stephen Gutekanst
d03078fbd6 mach: fix conflicting symbol name (recent change in Zig)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-19 12:34:08 -07:00
Stephen Gutekanst
85ddeeed5c mach: update to latest mach/gpu API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
6ec27861b4 mach: initial support for high-level ECS applications
Adds experimental support for high-level ECS-based applications
following hexops/mach#349

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 22:25:39 -07:00