Stephen Gutekanst
b146f47037
freetype: build: add package to tests
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Ali Chraghi
14ecaa6a7e
freetype: build: overall improvements
2022-05-24 11:55:07 -07:00
Stephen Gutekanst
ddaba2db87
freetype: ensure upstream/ submodule is cloned
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Stephen Gutekanst
d109720a3b
freetype: add subrepo .gitmodules
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Stephen Gutekanst
045dda287d
freetype: add upstream submodule
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Stephen Gutekanst
a65859d04a
freetype: move example fonts to upstream repo
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Stephen Gutekanst
240278fb4d
freetype: add freetype license file for clarity
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Ali Chraghi
b50dade2fd
freetype: initial import @ 4e2b158
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Stephen Gutekanst
0d2675507d
freetype: add .gitattributes, .gitignore
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Stephen Gutekanst
f083b3da0d
freetype: README: credit Ali properly
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Stephen Gutekanst
fb95a5ae95
dev: add mach-freetype subrepo
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
Stephen Gutekanst
cb7bd5f2f9
freetype: initialize subrepository
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-24 11:55:07 -07:00
iddev5
f3e2b8b74c
mach: add a standard way to access platform specific structs
...
This is done by adding platform.zig which is a file providing types like
``CoreType``, ``GpuDriverType`` and ``BackingTimerType``.
2022-05-23 01:03:43 -07:00
iddev5
e5050e856e
mach: Timer: wasm implementation using performance.now()
2022-05-23 01:03:43 -07:00
iddev5
9b7b8be285
mach: Timer: mark all wrapper functions as inline
2022-05-23 01:03:43 -07:00
iddev5
f64595393b
mach: include example name in step descriptions
2022-05-23 00:06:35 -07:00
iddev5
4fad3b93d2
mach: add compile-only step for examples and shaderexp
...
These steps will only compile and install the applications but not run
it. To be used as ``zig build example-*`` and ``zig build shaderexp``
respectively, i.e without the run prefix.
2022-05-23 00:06:35 -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
iddev5
dbdb2173b8
mach: do not install apps implicitly by default
2022-05-22 11:44:21 -07:00
iddev5
1491167daa
mach: wasm: enabled boids example and do not compile examples which are
...
unsupported
2022-05-22 11:44:21 -07:00
iddev5
281b1e75c0
mach: wasm: implement getWindowSize
2022-05-22 11:44:21 -07:00
iddev5
f7301cc242
mach: wasm: implement logging and panic handler
2022-05-22 11:44:21 -07:00
iddev5
c8c6dab65b
mach: wasm: initial implementation of Core, added js polyfill and
...
application html
2022-05-22 11:44:21 -07:00
iddev5
ccb1063e3f
mach: wasm: Add initial framework bones
2022-05-22 11:44:21 -07:00
iddev5
66cc8281e5
gpu: Dont link dawn and glfw in wasm32
2022-05-22 11:44:21 -07:00
iddev5
ae4374b9df
mach: wasm specific build system fixes
...
- Disable some examples
- Dont compile shaderexp at all
- Block off all run steps
2022-05-22 11:44:21 -07:00
iddev5
7466f32b62
mach: build system SDK improvements for wasm
...
- Target is now passed as an option in App.init()
- Always install() in all case
- Add functions getInstallStep(), setBuildMode() and run()
2022-05-22 11:44:21 -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
Stephen Gutekanst
a7e7dc800d
mach: expose window size (pixel units, vs. framebuffer subpixel units)
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-22 09:12:48 -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
iddev5
2b994d6b24
gpu: Fix build in 32-bit platforms
...
Because of the use of u64, this currently fails to build in 32-bit
platforms like wasm. usize is platform dependent but safe enough for
most use cases.
2022-05-21 23:00:38 -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
7bd841a638
mach: free EventNode(s) after poping from queue
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
iddev5
f1e7c10fbb
mach: remove Action enum and all references to it
2022-05-20 09:14:32 -07:00
iddev5
7486b0ebea
mach: Implement key input handling as event loop
...
This commit changes the former callback based design to handle key input
(GLFW-like) to an event loop based design (SDL-like). This uses a
TailQueue to store the events from inside of standard glfw callbacks.
This Queue is then popped while polling, thereby emulating event loop.
Removes from Engine the function: ``setKeyCallback`` and adds the
function: ``pollEvent`` which may return an event or null.
This change was done for two reasons:
1) Removing dependence of Engine on App. This was a circular dependency
and a genuine bad design.
2) Solve the recent regression due to the same which was (i) preventing
using types declared in Engine.zig and (ii) preventing usage of
multiple source files in an application.
Currently only key press and release events are implemented as these are
the ones currently used in examples.
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