Commit graph

42 commits

Author SHA1 Message Date
Ali Chraghi
3b162fdd7c all: update zig version 2022-12-18 18:02:31 -07:00
Keith Chambers
c9793a4666
glfw: update to zig 0.11.0-dev.811 (#640) 2022-12-15 16:47:19 -07:00
Eric Joldasov
441b7641b5 glfw: use null in enums
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2022-12-14 02:18:21 -07:00
Stephen Gutekanst
568d0155fd system-sdk: use macOS 12 SDK for macOS 13 for now
Fixes hexops/mach#606

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-11-25 10:31:04 -07:00
Stephen Gutekanst
661ac75a31 glfw: zig fmt (true and false no longer reserved names)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-11-24 09:55:07 -07:00
Stephen Gutekanst
d694b8031a glfw: ensure Window.from handle is untyped
Since users of the library do not have access to the `@cImport` struct (and we
do not want to expose that), the user may pass only an untyped `*anyopaque` pointer
which we'll internally cast to `*c.GLFWwindow`.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-11-06 15:02:57 -07:00
Cameron Murtagh
88c5f54380
glfw: system_sdk: bump max major linux version (#602) 2022-10-29 10:50:13 -07:00
BratishkaErik
aafb26189f
all: README: fix links to main repository (#600) 2022-10-28 10:22:23 -07:00
Ali Chraghi
5a851a2a28 system_sdk: better target check 2022-10-27 16:50:30 -07:00
Stephen Gutekanst
628387764c all: CI: update to latest Zig master version
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-22 09:11:16 -07:00
Stephen Gutekanst
e4d15208a5 glfw: expose error handling functions for rare usages
Fixes hexops/mach#586

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-17 05:10:52 -07:00
Dominic
6cb0d6236f
glfw: fix native import (#583)
Co-authored-by: Ali Chraghi <63465728+alichraghi@users.noreply.github.com>
Co-authored-by: dweiller <4678790+dweiller@users.noreplay.github.com>
Co-authored-by: Stephen Gutekanst <stephen.gutekanst@gmail.com>
2022-10-16 01:19:12 -07:00
Stephen Gutekanst
72ddde2529 glfw: remove self-hosted compiler workaround
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-15 07:56:18 -07:00
Stephen Gutekanst
373179f664 glfw: remove self-hosted compiler workaround
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-15 07:51:52 -07:00
Stephen Gutekanst
03590dede5 glfw: workaround self-hosted compiler bug
Helps hexops/mach#581

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-15 00:57:35 -07:00
Stephen Gutekanst
2c65845aed all: CI: update to latest Zig 0.10.0-dev.4333+f5f28e0d2
Produced via:

```
ZIG_VERSION=0.10.0-dev.4333+f5f28e0d2 ./dev/update-zig.sh
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-10-14 09:00:45 -07:00
Kami Development
622a9f4d86
glfw: fix compilation with latest zig master (#574)
See 0b1dd845d9
2022-10-14 08:55:15 -07:00
Ali Chraghi
58f7121a3d all: prefix environment variables with MACH_ 2022-10-11 00:59:23 +02:00
Ali Chraghi
82e10f4f28
all: build: thisDir improvements (#570)
* build:all: thisDir improvements

more performant output, usage code reducement and compileError for wrong usage

* glfw: update deprecated code
2022-09-29 08:41:46 -07:00
Ali Chraghi
fcb82345d4
all: build: organize build files and reduce unreachables (#567) 2022-09-25 10:02:51 -07:00
Ali Chraghi
f3109b365c all: update zig version 2022-09-19 20:11:55 -07:00
Ali Chraghi
cd6b7aa714 glfw: pass system sdk options through 2022-09-19 20:11:55 -07:00
Ali Chraghi
f1c74aabe2 glfw: don't reset hints after window creation
Closes #201
2022-09-17 07:03:04 -07:00
Diego Arias
73bef9a8c4 glfw: fix implicit function declaration error on clang15 2022-09-14 13:17:09 -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
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
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
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
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
ad981944d4 all: revert cimport workaround 2022-09-07 21:24:47 -07:00
Ali Chraghi
47e90c1a7e glfw: renable getName test 2022-09-02 09:42:48 -07:00
Ali Chraghi
669ef41219 glfw: fix cimport workaround errors for linux/windows 2022-09-02 09:42:48 -07:00
Ali Chraghi
157b3b1bd4 glfw:build: rename test steps 2022-08-29 05:59:52 -07:00
Ali Chraghi
47bdb5ea03 build: don't install libs, fix glfw shared lib compilation,
standardilize `buildXXX` funcs
2022-08-28 10:45:09 -07:00
Stephen Gutekanst
1e0fa20622 all: employ self-hosted @cImport hack only on Darwin targets
This is an poor approximation for the host OS running Darwin, which
is good enough for now. In practice this means macOS works but can't
cross-compile (until the cImport issue is fixed in Zig itself), but
Windows/Linux are unaffected and should be able to build natively and
cross-compile.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-27 11:19:57 -07:00
Ali Chraghi
01d8dc5714 glfw:build: undepend to X and OpenGL libs 2022-08-27 11:12:07 -07:00
Ali Chraghi
a0973af030 build: replace depracted functions 2022-08-27 11:12:07 -07:00
Ali Chraghi
b9e00fdbb6 build: fix memory leaks 2022-08-27 11:05:36 -07:00
Stephen Gutekanst
3011ed0ea4 all: update pull request template to reflect new libs/ dir
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-26 15:12:04 -07:00
Stephen Gutekanst
0645429df9 all: move standalone libraries to libs/ subdirectory
The root dir of our repository has grown quite a lot the past few months.

I'd like to make it more clear where the bulk of the engine lives (`src/`) and
also make it more clear which Mach libraries are consumable as standalone projects.

As for the name of this directory, `libs` was my first choice but there's a bit of
a convention of that being external libraries in Zig projects _today_, while these
are libraries maintained as part of Mach in this repository - not external ones.

We will name this directory `libs`, and if we have a need for external libraries
we will use `external` or `deps` for that directory name. I considered other names
such as `components`, `systems`, `modules` (which are bad as they overlap with
major ECS / engine concepts), and it seems likely the official Zig package manager
will break the convention of using a `libs` dir anyway.

Performed via:

```sh
mkdir libs/
git mv freetype libs/
git mv basisu libs/
git mv gamemode libs/
git mv glfw libs/
git mv gpu libs/
git mv gpu-dawn libs/
git mv sysaudio libs/
git mv sysjs libs/
git mv ecs libs/
```

git-subtree-dir: glfw
git-subtree-mainline: 0d5b853443
git-subtree-split: 572d1144f11b353abdb64fff828b25a4f0fbb7ca

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>

git mv ecs libs/

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-26 15:12:04 -07:00