Commit graph

85 commits

Author SHA1 Message Date
foxnne
8520c6d7d4 core: windows: Update to match darwin and handle updating the swapchain and window/framebuffer sizes 2024-12-24 15:40:16 -07:00
foxnne
4a6101241c core: darwin: magnify -> zoom_gesture, add workaround from GLFW for command key blocking keyUp on other keys 2024-12-24 15:40:16 -07:00
foxnne
a85916f00f core: darwin: implement cursor_mode and cursor_shape updates 2024-12-24 15:40:16 -07:00
foxnne
c70b1817ee core: window.color -> window.transparent, window.decorated, window.decoration_color 2024-12-24 15:40:16 -07:00
foxnne
ff11fd6d4c core: darwin: Add ability to detect and fire magnify event which is triggered by pinch to zoom on a trackpad 2024-12-24 15:40:16 -07:00
foxnne
98c303aefc core: darwin: More input callbacks, correct framebuffer/window sizes, core has responsibility of swapchain 2024-12-24 15:40:16 -07:00
foxnne
6ef58d8c1f example: core-transparent-window now animates the window color and transparency 2024-12-08 10:22:42 -07:00
foxnne
f8a2858df8 darwin: Get window title working 2024-12-08 10:22:42 -07:00
foxnne
ad5700cf48 core: Remove main_window in favor of users creating their own windows. Added event window_open which is called when the platform has finished initializing the window 2024-12-01 18:32:15 -07:00
foxnne
3aee6995d7 windows: translate and dispatch messages each frame 2024-12-01 13:19:02 -07:00
foxnne
06aec428de core: windows: Get triangle showing, still freezing on run. Comment out more windows, set value of window back on presentFrame. 2024-12-01 12:19:50 -07:00
foxnne
e15cbe63de windows: implement tick, call core.initWindow, various fixes 2024-12-01 10:55:01 -07:00
Colton Franklin
1fe47b2b19
obj: Move Platform and InitOptions fields into core.windows (#1309)
* obj: Make field tracking use a single bitset

* obj: module: fix comment

* obj: Move `Platform` state and `InitOptions` fields into `core.windows`, initial push, only triangle example working on macos currently

* obj: `get` and `getValue` (renamed `getAll`) now do not return optionals, comment revisions, `device` is no longer optional, `native` is optional

* core: Lots of cleanup of unnecessary comments

* core: `Event`s now all contain `window_id`, darwin/windows: event functions now send window id

* core: comments, examples: fix `core-custom-entrypoint`
2024-11-30 15:13:14 -07:00
foxnne
8f92bfbace core: add processWindowUpdates which we call from both platform_update_callback and tick 2024-11-27 18:30:53 -07:00
foxnne
0546c3d5ca obj: Refine comments, make updated set bits back to false, swap Objects parameters 2024-11-27 18:30:53 -07:00
foxnne
0476999dc4 core: Allow tracking of individual struct fields for changes 2024-11-27 18:30:53 -07:00
Stephen Gutekanst
ae1d49b51a object: add TODO; fix non-aarch64 macos builds
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-11-23 21:20:04 -07:00
Stephen Gutekanst
fc13b371bf core: various fixes
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-11-23 21:20:04 -07:00
Stephen Gutekanst
9d134dc72d module: object recycling
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-11-23 21:20:04 -07:00
Stephen Gutekanst
8054d03b4d unify mach.Call and mach.Runner into one type
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-11-23 21:20:04 -07:00
Stephen Gutekanst
14ccd5a93c settle module state initialization
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-11-23 21:20:04 -07:00
Stephen Gutekanst
0e12857154 examples/core: building without ECS
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-11-23 21:20:04 -07:00
Stephen Gutekanst
2a13c07d9e module: remove the ability to send "standard" arguments to systems
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-11-23 21:20:04 -07:00
Ronald M Zielaznicki
2608e1313c
core: x11: clarify X11 multi-threading (#1297) 2024-11-09 11:36:12 -07:00
Stephen Gutekanst
825a676d36 revise comments 2024-10-25 12:21:24 -07:00
Ronald M Zielaznicki
7220f367fd chore(Core): oxford commas are important 2024-10-25 12:21:24 -07:00
Ronald M Zielaznicki
355dd53857 change(Core): deinit platform after GPU backend release 2024-10-25 12:21:24 -07:00
Ronald M Zielaznicki
404cf1c42a add(Core.zig): call to deviceTick after platform update 2024-10-20 21:40:02 -07:00
Joshua Holmes
88d14b5c04 core: get wayland to compile 2024-09-17 10:59:30 -07:00
Hordur Johannsson
d7d8029523
core: add more keys to Key enum (#1262) 2024-08-31 13:24:36 -07:00
Stephen Gutekanst
cd5cad696d core: fix process exit status code
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-27 21:26:41 -07:00
Stephen Gutekanst
9a940f2879 core: clarify allocator is internal state
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 19:24:35 -07:00
Stephen Gutekanst
f548918e13 core: move linux-specific code to Linux.zig
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 19:04:37 -07:00
Stephen Gutekanst
cd85a2d623 core: basic Linux structure
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 19:00:22 -07:00
Stephen Gutekanst
c66cd31b99 core: move types to bottom of Core.zig
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 18:54:55 -07:00
Stephen Gutekanst
8447654311 core: move input state tracking from Platform to Core
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 18:50:32 -07:00
Stephen Gutekanst
1c0434a948 core: remove verbose comments
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 18:21:21 -07:00
Stephen Gutekanst
09d39fb694 core: simplify event iterator
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 16:51:16 -07:00
Stephen Gutekanst
2eac60caf1 core: centralize EventQueue and EventIterator declaration
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 16:04:25 -07:00
Stephen Gutekanst
1fab277bf7 core: remove unimplemented joystick API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 15:57:18 -07:00
Stephen Gutekanst
470a84909b core: more code refactoring / improvements
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 15:45:43 -07:00
Stephen Gutekanst
de1275dc0a core: refactor code structure
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 15:38:13 -07:00
Stephen Gutekanst
133c89638b all: move mach.Timer, core Timer/Frequency to mach.time module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 14:24:09 -07:00
Stephen Gutekanst
301a8df8f9 remove unmaintained WASM support
Same reasoning as #1254

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 13:35:16 -07:00
Stephen Gutekanst
c2767b4e01 core: fix build with Null backend
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-25 11:52:36 -07:00
Hordur Johannsson
13e53e7176 Fixing core to work with win32 #1257 2024-08-25 09:59:08 -07:00
Stephen Gutekanst
17450fde65 core: remove linux support
The `mach.Core` API needs major design changes, and every backend that it supports
today must be updated to account for those API design changes. Unless someone is
actively maintaining and improving the state of a given backend, it slows down our
ability to make those critical changes.

Unfortunately, the backends for X11 and Wayland today are half-baked, nobody is
actively maintaining on or contributing to them, and the Linux CI tests have been
broken for over a month as a result which harms overall stability of Mach.

As a result, this PR removes Linux support from `mach.Core`

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-24 23:42:37 -07:00
Stephen Gutekanst
984d4de3bd
core: win32: various improvements (#1255)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Authored-by: Hordur Johannsson <hordurj@gmail.com>
2024-08-24 23:16:53 -07:00
Stephen Gutekanst
a5a3d31411 core: remove WASM support
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-24 22:33:15 -07:00
Stephen Gutekanst
642cc9b7f7 make it clear how to use module system without mach.Core (remove mach.App)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-08-24 22:33:15 -07:00