Commit graph

228 commits

Author SHA1 Message Date
Ayush
858c14bbae
{mach,examples}: Fix memory leaks (#384) 2022-07-03 08:47:47 -07:00
Ali Chraghi
2b325e9c4b freetype: rename OutlineFuncs* to Funcs* 2022-06-14 19:53:29 -07:00
Stephen Gutekanst
53a1a2e9fd examples/gkurve: update to latest freetype API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-10 13:24:02 -07:00
PiergiorgioZagaria
112b837cae examples/gkurve: fixed logic for points inside polygon 2022-06-10 13:24:02 -07:00
PiergiorgioZagaria
c1b3996b63 examples/gkurve: support for UTF32 characters 2022-06-10 13:24:02 -07:00
PiergiorgioZagaria
98138dd2fa examples/gkurve: initial commit for resizable_label 2022-06-10 13:24:02 -07:00
iddev5
2d53b8bdfd examples: Do not return bool on update()
Also replaced all ``return false;`` usages with Engine.setShouldClose(true).
2022-06-08 07:31:53 -07:00
Ali Chraghi
04a0a79ef6 freetype: ~99% Core-API Coverage
- breaking structure changes
- optimazed examples
- more tests
2022-06-07 19:23:33 -07:00
David Vanderson
a2a6c2a288
mach: add mouse motion and mouse button events (#325)
* add mouse motion and mouse button events
* add scroll events
* switch from button/action to mouse_press and mouse_release events
2022-06-04 06:29:23 -07:00
iddev5
7b395759b7 examples, shaderexp: update to new options and size limit API 2022-06-01 23:45:56 -07:00
iddev5
03491dfd27 examples: update to new Engine API 2022-06-01 23:45:56 -07:00
David Vanderson
3961073084
{mach,examples}: followups to getWindowSize / getFramebufferSize (#322)
* followup to window size saving, getWindowSize and getFramebufferSize no longer return errors
* updated the examples
2022-05-31 11:39:53 -07:00
PiergiorgioZagaria
8fa9ab2f58 examples/gkurve: add atlas text rendering 2022-05-27 21:24:31 -07:00
iddev5
b5737af9cd examples: Load all images from Memory (using embedFile) instead of File 2022-05-27 01:09:15 -07:00
Ali Chraghi
b5d10fb167 gpu: taked slice child type in writeTexture 2022-05-24 14:34:13 -07:00
Stephen Gutekanst
8d067b62c2 examples/gkurve: update wireframe rendering to 2 barycentric coordinates
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-22 22:57:22 -07:00
Stephen Gutekanst
38091d0d1b examples/gkurve: add alpha blending
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-22 21:12:35 -07:00
Stephen Gutekanst
ec95bc8103 examples/gkurve: correct LICENSE for texture atlas code 2022-05-22 11:50:15 -07:00
PiergiorgioZagaria
056f13cd6e examples/gkurve: added LICENSE.atlas 2022-05-22 11:50:15 -07:00
PiergiorgioZagaria
2f87141a3a examples/gkurve: added texture atlas 2022-05-22 11:50:15 -07:00
Stephen Gutekanst
01f88df397 examples/gkurve: make orthographic view use pixel (not subpixel) units
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-22 09:12:53 -07:00
PiergiorgioZagaria
1e8ad533e2
examples: gkurve added shapes and textures (#284) 2022-05-22 08:52:40 -07:00
iddev5
f4de00d8b5 examples: boids: use std.log.info instead of std.debug.print
std.debug.print uses IO which depends on file system and thus needs
support from OS, which dont have in freestanding targets (like WASM).
2022-05-22 08:26:56 -07:00
Stephen Gutekanst
ff5636c6f6 examples/gkurve: adjust frag shader to show barycentric coordinates
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-21 12:40:29 -07:00
Stephen Gutekanst
2b2ba15332 examples/gkurve: correct triangle coordinates (one was inverted horizontally)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-21 12:18:10 -07:00
Stephen Gutekanst
2d4d856e55 examples/gkurve: fix bug in barycentric coordinates
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-21 12:14:05 -07:00
Stephen Gutekanst
2b718c6de1 examples/gkurve: explain frag_bary coordinates intent
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-21 11:26:54 -07:00
Stephen Gutekanst
eae2a090c6 examples/gkurve: border rendering, non-linear field
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-20 12:26:43 -07:00
iddev5
58709070dd examples: remove commented out old code in advanced-gen-texture-light 2022-05-20 09:14:32 -07:00
iddev5
02b9048734 examples: update to new event-based input method 2022-05-20 09:14:32 -07:00
Stephen Gutekanst
92028a11ef examples/gkurve: take into account high density displays
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-20 08:56:47 -07:00
PiergiorgioZagaria
a4e8de2a83 examples: fix depth texture recreation 2022-05-20 08:52:14 -07:00
iddev5
3bb45c75a1 mach: introduce cross platform Timer abstraction
This Timer uses std.time.Timer as backing timer in native platforms, and
will use custom timers for special platforms (wasm, android?, ios?).

Unlike std.time.Timer, its primary API is focused on floats. Also meant
to provides some convenient functions alongside base ones.

Follows std.time.Timer API, but methods by default return f32 i.e
non-precise variant with precise variants available returning u64.
2022-05-17 23:56:41 -07:00
Stephen Gutekanst
be935c64ef examples/gkurve: change window size to default 2022-05-15 10:36:08 -07:00
iddev5
657091ed65 mach: Reorganised native backend files, moved structs and fixed circular
dependency
2022-05-15 10:36:08 -07:00
PiergiorgioZagaria
2df0bc2786
examples/gkurve: moved vertex uniform data to vertex buffer and added view (#277) 2022-05-15 10:34:09 -07:00
Stephen Gutekanst
34e019a212 examples/gkurve: use equadistant triangles for easier debugging
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-15 02:55:23 -07:00
Stephen Gutekanst
e35b86ad25 examples/gkurve: calculate barycentric vertex coordinates in shader
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-15 02:55:23 -07:00
Stephen Gutekanst
dae283734f examples/gkurve: cleanup code formatting
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-15 02:55:23 -07:00
Stephen Gutekanst
1562232871 examples/gkurve: use orthographic projection + pixel units
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-15 02:55:23 -07:00
Stephen Gutekanst
af608151e9 examples/gkurve: simplify fragment shader, use barycentric coordinates
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-14 13:23:45 -07:00
iddev5
8b46f46cf8 mach: Create binding methods for all glfw methods in use and update
examples
2022-05-13 16:17:18 -07:00
iddev5
9106a9839d examples: remove global state workaround in advanced-gen-texture-light 2022-05-09 08:08:01 -07:00
iddev5
1f95bd48df examples: use engine.core.setKeyCallback() instead of accessing glfw directly 2022-05-09 08:08:01 -07:00
PiergiorgioZagaria
a1daf399a3 examples: created gkurve example 2022-05-08 15:02:39 -07:00
PiergiorgioZagaria
ddf8704559 examples: fixed uniform buffer release and unused var 2022-05-08 09:48:05 -07:00
d3m1gd
09f3adf2b4 examples: fix typo 2022-05-04 11:53:16 -07:00
iddev5
2b978a6883 examples: fix unwanted fractal cube resource releases causing validation error 2022-05-01 11:46:43 -07:00
Lee Cannon
4570838304
Update to latest Zig master (0.10.0-dev.2017+a0a2ce92c) (#261)
* use `@ceil` instead of `std.math.ceil`
* `ChildProcess.init` does not allocate anymore
* update CI zig version
* examples: temporarily switch to fork of zigimg compatible with zig-master

Commands executed:

```
git submodule set-url -- examples/libs/zigimg https://github.com/slimsag/zigimg
git submodule set-branch --branch zig-master -- examples/libs/zigimg
git submodule update --init --remote examples/libs/zigimg
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-01 11:44:27 -07:00
iddev5
218a6a5c08 examples: port to new API 2022-04-29 13:06:34 -07:00