Patrick Walton
93f5fbc6d2
Add convenience constructors: `vec2f`, `vec2i`, `Vector2F::zero()`,
...
`Vector2I::zero()`
2020-03-31 11:29:21 -07:00
Patrick Walton
0f35d9c817
Add an embedded resource loader that places resources directly in the binary.
...
This is useful for WebGL and for downstream crates.io use.
2020-02-28 17:10:53 -08:00
Patrick Walton
5a21557a6d
Implement basic linear gradients.
...
This is not a very efficient implementation yet, but it seems to work.
2020-02-10 16:01:05 -08:00
Emmanuel Gil Peyrot
6ce416e77c
Bump all outdated dependencies
...
I’m pleasantly surprised that none of these required any (visible) code
change, but tests pass so let’s go with that. :)
2020-02-06 09:39:50 +01:00
Patrick Walton
0662f6433f
Allow any texture format to be uploaded; fix Metal compilation on newer rustcs
2019-12-20 11:48:51 -08:00
Patrick Walton
431dcf3d2e
Rename `pathfinder_geometry::basic` to simply `pathfinder_geometry`, and move
...
the remaining code in that crate to a new crate, `pathfinder_content`
The old hierarchy was confusing.
2019-06-21 10:06:19 -07:00
Patrick Walton
71623eaab3
Make Metal dependencies in the demo Mac-only
2019-06-20 12:34:55 -07:00
Patrick Walton
487577a11b
Add Metal support.
...
This commit substantially reworks the `pathfinder_gpu` API to better support
modern APIs like Metal. It should open the door to `gfx-rs`, `wgpu`, Vulkan,
and D3D12 backends relatively straightforwardly.
A new example, `canvas_metal_minimal`, has been added.
Note that the new Metal shaders require a patched version of `spirv-cross` to
build properly. An upstream patch is forthcoming.
2019-06-20 11:47:22 -07:00
Patrick Walton
a1b0df0a42
Rename `Point2DF` to `Vector2F`, `Point3DF` to `Vector4F`, and `LineSegmentF`
...
to `LineSegment2F`.
Straw poll on Twitter suggested that these names were preferred.
2019-06-03 12:39:29 -07:00
Patrick Walton
e1bcc11ace
Change the `F32` and `I32` suffixes to `F` and `I` to match the C API.
...
They're shorter and less noisy.
2019-05-29 19:17:16 -07:00
Patrick Walton
66b5142334
Stop trying to use jemalloc on Windows.
...
Closes #138 .
2019-05-02 11:12:33 -07:00
Patrick Walton
a96ee73da6
Introduce an Executor abstraction to enable alternatives to Rayon
2019-04-30 15:17:07 -07:00
Patrick Walton
60b951409c
Run `rustfmt` on the demos
2019-04-29 16:52:37 -07:00
Patrick Walton
8606cd013e
Replace commented out printlns with proper debug statements
2019-04-29 16:43:24 -07:00
Patrick Walton
b85dc2f001
Add basic pinch zoom support on Android
2019-04-26 22:29:38 -07:00
Patrick Walton
6c31e1bc01
In VR mode, render one eye and then reproject to both eyes instead of rendering
...
twice.
This reduces both CPU and GPU time a lot in exchange for a small loss in
quality.
2019-04-26 17:22:54 -07:00
Alan Jeffrey
eedb8bbadf
Separated viewport from make_current.
2019-04-12 11:30:00 -05:00
Alan Jeffrey
50e5790c9f
Allow devices to determine the viewport for each eye
2019-04-12 09:07:52 -05:00
Patrick Walton
c5ccd0f6e0
Add partial support for transparent background colors.
2019-04-10 14:43:36 -07:00
Alan Jeffrey
c26a443b0d
Make the demo window present method take a &mut self
2019-04-08 11:16:57 -05:00
Alan Jeffrey
dc77a5262f
TAB toggles UI visibility in the demo
2019-04-02 15:55:38 -05:00
Alan Jeffrey
4db3fb6279
Allow demo apps to provide default options
2019-04-02 15:21:05 -05:00
Patrick Walton
ae192ffee7
Add ARM SIMD
2019-03-28 19:26:47 -07:00
Patrick Walton
9025189650
Allow opening new SVGs in the Android port
2019-03-18 18:13:13 -07:00
Patrick Walton
5db7edad0b
Add specific rendering methods for each eye
2019-03-14 20:15:48 -07:00
Patrick Walton
e212a839b4
Get device orientation changes partially working
2019-03-14 19:13:27 -07:00
Patrick Walton
bb32777101
Initial work toward VR support
2019-03-14 14:42:22 -07:00
Patrick Walton
9c404dfdc1
Add an Android port
2019-03-12 13:55:26 -07:00
Patrick Walton
d5effc35ae
Invert control flow.
...
There's an issue whereby if keys are held down in the 3D mode it doesn't keep
redrawing. This will be fixed in a followup.
2019-03-08 12:45:10 -08:00
Patrick Walton
d1728dfe6d
Update the scalar SIMD fallback
2019-03-08 12:30:07 -08:00
Patrick Walton
a74c0abbec
Factor the SDL code out in preparation for other ports
2019-03-07 16:14:26 -08:00
Patrick Walton
d30743a69c
Begin refactoring the demo into a shared library and a platform-specific
...
entry point.
This will help the upcoming wasm port.
2019-02-15 18:21:46 -08:00