Commit graph

2540 commits

Author SHA1 Message Date
Ali Chraghi
15dfb2867a all: rename setShouldClose to close
Closes #550
2022-09-18 09:50:15 -07:00
Cai Bingjun
308d413f09 gpu-dawn: add mirror support for headers.json.gz 2022-09-17 20:22:32 -07:00
Stephen Gutekanst
412df4490c mach: fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-17 08:50:25 -07:00
Stephen Gutekanst
5e8ab95a74 {gpu-dawn,docs}: add MACH_GITHUB_BASE_URL for using GitHub mirror sites
Users in the Chinese mainland find download speeds are too slow and need
an option to use GitHub download mirroring sites like fastgit.org, this
makes it possible to configure that using an environment variable.

See the documentation for more details.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-17 08:49:26 -07:00
Ali Chraghi
f1c74aabe2 glfw: don't reset hints after window creation
Closes #201
2022-09-17 07:03:04 -07:00
Ali Chraghi
6043c7eae6
mach: add is_app option to disable gamemode in desktop applications; use parseIp4 (#544)
* mach: add `is_app` option to disable gamemode in desktop applications
* use parseIp4 instead of resolveIp (which throws a compile error in windows)
2022-09-16 23:32:27 -07:00
LeRoyce Pearson
47d1544b64
{mach,sysjs}: put WASM imports into their own namespaces (#537) 2022-09-16 16:56:22 -07:00
Diego Arias
eef76effe3 examples: add pixel post processing effect example 2022-09-16 16:49:20 -07:00
Louis Pearson
6183e39593
mach: add {s} formatter to mouse cursor debug print (#539)
* Fix setMouseCursor compile error
2022-09-16 16:42:19 -07:00
Jeremia
7ed8829349
mach: better compile error for missing fields in App. (#548)
Stage2 Zig ends up coercing structs without any fields into consts.
The current error given is not entirely clear to the cause or how
to fix the issue for users.

Related to https://github.com/ziglang/zig/issues/12275
2022-09-16 16:36:15 -07:00
Ali Chraghi
8b50f076a6 {build,wasmserve}: improvements
build: use parseIp4 instead resolveIp
wasmserve: use ansi_to_html.js instead ansi_up.js
wasmserve: handle build procces unexpected exits and more
2022-09-15 07:42:59 -07:00
praschke
b0cd4ec1a0
all: fix pointless discards; typo; fix libmach compilation on Linux (#541) 2022-09-15 07:41:05 -07:00
praschke
38c4fc5b01 mach: make default minimum window size 350x350 2022-09-15 07:39:38 -07:00
praschke
a873227ab8 {mach,examples,shaderexp}: fix default minimum window size 2022-09-15 07:39:38 -07:00
Louis Pearson
9676665ccf
mach: fix setMouseCursor compile error (#538) 2022-09-14 18:15:41 -07:00
Diego Arias
73bef9a8c4 glfw: fix implicit function declaration error on clang15 2022-09-14 13:17:09 -07:00
Ali Chraghi
aaddd4dbeb {build,wasmserve}: show error on browser + improvements 2022-09-14 12:32:03 -07:00
Ali Chraghi
5be9f04d85 {build,wasmserve}: use wasmserve, drop apple_pie 2022-09-14 12:32:03 -07:00
Alexandre Chêne
ebb4b9c2fe
glfw: remove ineffective _ = variable assignment (#531) 2022-09-14 10:40:20 -07:00
locriacyber
b8c48d6321
all: remove ineffective _ = variable assignments (#530)
Lastest Zig complains about this, so they must removed to build.
2022-09-14 09:42:29 -07:00
Stephen Gutekanst
98d929611c gpu-dawn: add CURL_INSECURE=true option to workaround windows SSL issues
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-12 20:45:24 -07:00
Stephen Gutekanst
23f9e9fb65 gpu: README: fix image size, clarify Mach core
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-11 09:52:55 -07:00
Stephen Gutekanst
b0ea3b9e44 dev: add mach-gpu to push_subrepos.sh
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-11 09:46:25 -07:00
Stephen Gutekanst
dd1b0a413e gpu: polish README
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-11 09:44:43 -07:00
Stephen Gutekanst
8af0c9a6a8 mach: correctly link sysaudio to all Apps
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-11 00:17:52 -07:00
Stephen Gutekanst
8113ca370d all: remove support for stage1
With almost all tests/examples working on all platforms now with the new compiler,
https://github.com/hexops/mach/issues/180, it's time to remove stage1 support.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-10 00:09:30 -07:00
Stephen Gutekanst
4c3a19fc26 sysjs: improve self-hosted compiler support
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-09 23:37:50 -07:00
NewbLuck
f15cea9492
examples: add cubemap example (#523)
Co-authored-by: Scott Johnson <scott.johnson@furniturerow.com>
2022-09-09 22:41:24 -07:00
Louis Pearson
70f4514c66 sysaudio: fix compile for web 2022-09-09 22:39:35 -07:00
Stephen Gutekanst
b72c2c978f sysaudio: target a desired buffer size / latency instead of assuming maximum
On most platforms the maximum amount of frames we can write is reasonable and
provides rarely noticable latency, but on some platforms (e.g. Windows prior
to Mason's patch) this is not true. It's a good idea therefor to target a
desired buffer size / number of frames to write per update, which is also exactly
what we must decide on the WebAudio backend. For now this is hard-coded in sysaudio
but we will expose this as a config option soon.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-09 22:34:43 -07:00
Stephen Gutekanst
c009ff3f90 sysaudio: fix buffer size on Windows
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-09 22:32:17 -07:00
Stephen Gutekanst
78485e49f5 mach: wasm: add stub GPUInterface
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-09 22:06:27 -07:00
Stephen Gutekanst
2ba7e48ac2 {sysjs,mach}: correctly pass sysjs dependency to sdk
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-09 21:55:38 -07:00
Stephen Gutekanst
f1ae31ae86 ecs: improve compatibility with self-hosted compiler
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-09 21:23:51 -07:00
Stephen Gutekanst
4a421b8130 mach: update to latest sysaudio SDK API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-10 04:06:16 +00:00
Stephen Gutekanst
f8c8d27c70 glfw: update Linux system SDKs for mach/sysaudio
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-10 04:06:16 +00:00
Stephen Gutekanst
d044104d80 gpu: remove commented code
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-10 04:06:16 +00:00
Stephen Gutekanst
7511392a02 sysaudio: switch to sdk builder pattern for system_sdk access
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-10 04:06:16 +00:00
Louis Pearson
f29c3aac08 sysaudio: fix clicking by tracking frame_offset
The offset into the planar_buffer was not being stored, so any time
multiple iterations occured the beginning of the wave was copied again,
instead of correctly copying the next part of the planar_buffer.
2022-09-10 04:06:16 +00:00
Stephen Gutekanst
b282641300 all: update to latest Zig nightly version
Performed via:

```sh
VERSION=0.10.0-dev.3952+9e070b653 ./dev/update-zig.sh
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-10 02:16:05 +00:00
NewbLuck
46c4ea4ebd
all: update to use latest Zig master APIs (#521)
Co-authored-by: Scott Johnson <scott.johnson@furniturerow.com>
2022-09-10 02:07:30 +00:00
Louis Pearson
0e71daf504
{sysaudio,examples}: get sysaudio running on linux, separate audio configuration and descriptor (#518)
* Get sysaudio working on linux
* Separate audio configuration and descriptor
* Config/Descriptor -> Options/Properties
- Rename sysaudio DeviceConfig and DeviceDescriptor to Device.Options and Device.Properties
- example: Convert buffer before passing to renderWithType
* make Device.start() idempotent
2022-09-09 08:58:03 -07:00
Stephen Gutekanst
f807c85232 all: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-08 10:22:43 -07:00
Stephen Gutekanst
0a1ff43ce5 ecs: improve compatibility with self-hosted compiler
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-08 10:22:11 -07:00
Stephen Gutekanst
9a759c55c5 mach: do not attempt to import gamemode on non-Linux platforms
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-08 07:26:46 -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
54719c2de8 ecs: improve compatibility with self-hosted compiler
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-08 07:26:15 -07:00
Stephen Gutekanst
98860a67fa glfw: workaround cImport self-hosted compiler bug ziglang/zig#12784
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-09-08 07:19:36 -07:00
Ali Chraghi
06b0609ada examples: add triangle-msaa 2022-09-07 21:25:35 -07:00
Ali Chraghi
194971586d mach: use std.log.(scope) instead of std.debug.print 2022-09-07 21:25:35 -07:00