Commit graph

1589 commits

Author SHA1 Message Date
Stephen Gutekanst
5466375f40 glfw: fix caching bug in system_sdk that prevents cross-compilation in some situations
Prior to this change, cross-compiling Mach to other OSes was not working due to a regression.
e.g. to windows:

```
zig build -Dtarget=x86_64-windows run-example-boids
LLD Link... error(link): DLL import library for -ldxguid not found
error: DllImportLibraryNotFound
error: example-boids...
```

The problem was that one build step may invoke `getSdkRoot` and the target might be for say macOS,
since it's building e.g. GLFW for macOS as the target of tests, and `getSdkRoot` would cache the
SDK root _forever_ as being the macOS SDK (in an attempt to avoid running the various git commands
needed to resolve the SDK root multiple times, which slows builds down.)

We instead need to cache the SDK root per step, because the target may not be the same.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-22 19:30:59 -07:00
Ali Chraghi
001e191e5c freetype: Implement needed Computation API 2022-07-22 17:49:25 -07:00
Ali Chraghi
30612500e0 freetype: update examples
compile error due the last functions rename
2022-07-22 17:49:25 -07:00
alichraghi
0aa9cc4a04 freetype: Bitmap Handling 100% Coverage 2022-07-22 17:49:25 -07:00
Stephen Gutekanst
fbc9cee4cc libmach: respect build target / mode flags
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-21 19:41:33 -07:00
alichraghi
741b4d9eb7 ci: improve jobs 2022-07-21 19:41:06 -07:00
alichraghi
fc90fa6689 build: renable tests target option 2022-07-21 19:41:06 -07:00
dweiller
4f7d3ddedf examples/gkurve: fix memory leak 2022-07-20 21:16:48 -07:00
dweiller
35930b1600 examples/gkurve: ResizableLabel: fix deinit leaks
This issue with the previous (commented out) implementation was that by
remaking the iterator each loop, the same element was attempted to be
freed each iteration, as the element was not actually removed from the
map.
2022-07-20 21:16:48 -07:00
Zachary Huang
8f6273c0d0 libmach: fix small issues and naming conventions 2022-07-20 18:59:29 -07:00
Zachary Huang
5d86314fbb libmach: update API again, factors out init/update/deinit from native.zig main function 2022-07-20 18:59:29 -07:00
alichraghi
ce21694d75 sysjs: use refAllDeclsRecursive to find and fix mistakes 2022-07-20 18:55:59 -07:00
alichraghi
48a4b9a7a6 glfw: use refAllDeclsRecursive to find mistakes 2022-07-20 18:55:59 -07:00
alichraghi
348733867c gpu: use refAllDeclsRecursive to find and fix mistakes 2022-07-20 18:55:59 -07:00
alichraghi
6cd965e953 ecs: use refAllDeclsRecursive to find and fix mistakes 2022-07-20 18:55:59 -07:00
alichraghi
e6adc3e350 build: add mode paramater to testStep functions 2022-07-20 18:55:59 -07:00
Zachary Huang
77aecbe806 libmach: update API, exposes init, update, and deinit functions 2022-07-19 09:32:52 -07:00
alichraghi
d194dafb79 build: add test-mach step to test src/ and test for testing all sub-projects 2022-07-19 09:25:55 -07:00
alichraghi
08cfc2368f sysaudio: skip "requestDevice behavior: invalid id" test 2022-07-19 09:25:55 -07:00
alichraghi
a6cadba1ba freetype: update test fonts path to be used in parent directories 2022-07-19 09:25:55 -07:00
alichraghi
83f051fb58 freetype/harfbuzz: fix invalid getGlyphInfos return
Co-authored-by: ab55al <abdullah5590x@gmail.com>
2022-07-19 09:20:24 -07:00
alichraghi
2388eb1c3a freetype: Glyph Stroker 100% API Coverage 2022-07-19 09:19:55 -07:00
Stephen Gutekanst
8184ce82f7 freetype: rename newX functions to createX 2022-07-19 09:19:55 -07:00
alichraghi
dc832997e4 freetype: fix import structure 2022-07-19 09:19:55 -07:00
alichraghi
4e624c5381 freetype: update LineJoin members name
Consonance with Zig Style Guide
2022-07-19 09:19:55 -07:00
PiergiorgioZagaria
2f1a9f4364 freetype: fix tests for stage2 and Face.getGlyphName() 2022-07-19 09:11:54 -07:00
Uneven Prankster
6a5bb2566e
README: add Discord Server (#419)
Stephen has recently created a Discord server to go alongside the Matrix chat one for people more used to Discord. I wish to add it to the README so people checking out the project can access it.
2022-07-18 15:25:01 -07:00
iddev5
d12ba02c38 sysaudio: webaudio: Implement audio playback using data_callback
Supports passing user context as well as provides the current device.
2022-07-17 09:48:26 -07:00
iddev5
c22e54bcd7 sysaudio: webaudio: Set internal buffer size to 512
It was 4096 before. Lower values means lower latency but higher values
are needed for clear audio. It should be properly tested across multiple
browsers to find out the correct default value, or create a formula to
auto calculate it. It should always be a multiple of 2 in the range 256,
512, ..., 8192, 16384.
2022-07-17 09:48:26 -07:00
iddev5
4c264c80cd sysjs: Allow passing arbitary values (called 'captures') alongside native functions 2022-07-17 09:48:26 -07:00
iddev5
b39261a655 sysjs: Fix passing arguments into constructor 2022-07-17 09:48:26 -07:00
Lucas Romanó
7de47a8f2d examples: add map-async example
Signed-off-by: Lucas Romanó <9062026+lucasromanosantos@users.noreply.github.com>
2022-07-17 09:27:29 -07:00
alichraghi
a825965208 dev: make update-zig work on linux 2022-07-17 09:26:29 -07:00
alichraghi
be9d2b431f {frreetype,sysaudio}: use std.refAllDeclsRecursive
added to stdlib via #12103
2022-07-17 09:26:29 -07:00
Stephen Gutekanst
0ff83ba517 gpu-dawn: update to Zig 0.10.0-dev.3027+0e26c6149 (iterate / OpenDirOptions stdlib change)
This breaking change in the Zig stdlib is not available as a nightly build yet, so our CI will
be broken for the next day or so until that becomes available and we can update it.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-17 09:20:48 -07:00
Stephen Gutekanst
bbb276854b all: update to Zig 0.10.0-dev.3027+0e26c6149
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-17 09:20:48 -07:00
Lucas Romanó
a787265af2 examples: add image-blur example
Signed-off-by: Lucas Romanó <9062026+lucasromanosantos@users.noreply.github.com>
2022-07-15 12:02:17 -07:00
Zachary Huang
9ece370059 libmach: initial API bindings for mach core 2022-07-14 22:44:44 -07:00
iddev5
02c7fe9a75 mach: build: Add sysaudio dependency package 2022-07-14 21:55:32 -07:00
iddev5
94c4d3a679 sysaudio: webaudio: Use device descriptor to create suitable audio
context
2022-07-14 21:55:32 -07:00
iddev5
43936df45b sysaudio: webaudio: Add device start and pause 2022-07-14 21:55:32 -07:00
iddev5
21f3efe78e sysaudio: webaudio: Add intitial implementation and boilerplate 2022-07-14 21:55:32 -07:00
iddev5
a3b9bb7469 sysaudio: Add mach-sysjs dependency and prepararation for WebAudio backend 2022-07-14 21:55:32 -07:00
dweiller
ebc09ee55e ecs: generic iterator type
This change makes the the Iterator generic over the components being
queried. This restores the api to the previous style with components
given to the query() function and next() having no parameters (other
that the iterator itself).
2022-07-14 21:49:20 -07:00
dweiller
b9fc04de6a ecs: make Entities.query take a typed query 2022-07-14 21:49:20 -07:00
alichraghi
f8f4dcf55f audio: rename to 'sysaudio' 2022-07-13 01:31:08 -07:00
alichraghi
0fb712d19e audio: update upstream 2022-07-13 01:31:08 -07:00
alichraghi
2794a7438f freetype: remove deinit error logs
the error only happens when handle is null wich is unreachable
2022-07-13 01:31:08 -07:00
iddev5
7a0d39c274 mach: Rename `js-runtime subproject to sysjs` 2022-07-13 01:30:10 -07:00
dweiller
05b0df052d ecs: fix pointer invalidation in get/setComponent
The reference to the old archetype is invalidated by getOrPut() calls of
std.ArrayHashMap. The implementation of std.ArrayHashMap means that
pointers can be invalidated on getOrPut() calls even if the key exists
in the map. This means that the reference to the old archetype needs to
be refreshed unconditionally (i.e. not only if the new archetype didn't
exist previously).
2022-07-12 06:56:49 -07:00