Commit Graph

214 Commits

Author SHA1 Message Date
Mike Welsh 03b5edd4d1 render: Remove RenderBackend::draw_letterbox
Move letterbox draw logic to `Player`, using renderer.draw_rect
2021-01-07 11:46:07 -08:00
Mike Welsh 8d1d2efea4 webgl: Request OES_element_index_uint extension on WebGL1
Needed to support u32 index buffers.
2021-01-06 13:24:10 -08:00
Mike Welsh 0754f0a3b3 render: Use u32 indices 2021-01-04 18:08:14 -08:00
Mike Welsh 8cdf04384c webgl: Use mult color for draw_rect (fix #2189) 2020-12-31 15:20:37 -08:00
Mike Welsh 9b6295f33a render: Pass library to RenderBackend::register_shape (fix #2037)
Pass the movie library to `register_shape` methods so that bitmap
charcter IDs can be resolved immediately on the proper SWF.

This fixes #2037, which cause incorrect bitmaps to be used when
multiple movies were loaded.
2020-12-31 13:10:21 -08:00
Mike Welsh 3ff6a37ff4 webgl: Make separate VAO for color quad vs. bitmap quad (fix #1834) 2020-12-27 23:01:24 -08:00
Mike Welsh 99cfdd4ea7 render: Avoid excessive clones in register_bitmap calls 2020-12-15 00:04:51 -08:00
Mike Welsh 369c5bda56 render: Implement Bitmap smoothing property 2020-12-15 00:04:51 -08:00
Mike Welsh 69216b75fb webgl: Don't recreate texture on update 2020-12-15 00:04:51 -08:00
Mike Welsh acc9c84ccb webgl: Allow render_bitmap to work with bitmaps without a character ID 2020-12-15 00:04:51 -08:00
CUB3D a92b8ffded core: All other changes from review 2020-12-15 00:04:51 -08:00
CUB3D ccd08f14d9 core: Fix naming and safety issues 2020-12-15 00:04:51 -08:00
CUB3D 6f91352d41 chore: Fix clippy lints 2020-12-15 00:04:51 -08:00
CUB3D b3dd5c0c0b core+renderer: Fix corner cases 2020-12-15 00:04:51 -08:00
CUB3D 353d5a268b core: Add better handling of invalid arguments to BitmapData 2020-12-15 00:04:51 -08:00
CUB3D 9d46d67588 core+web+renderer: Add load/attach Bitmap and handling for invalid args with BitmapData 2020-12-15 00:04:51 -08:00
relrelb e5ace596ce chore: Update some dependencies
* js-sys and wasm-bindgen are now the currently latest releases.
* wgpu is not updated to the current master because it breaks
things up.
2020-12-11 11:28:33 -08:00
dependabot-preview[bot] d1c79a5dd5 build(deps): bump png from 0.16.7 to 0.16.8
Bumps [png](https://github.com/image-rs/image-png) from 0.16.7 to 0.16.8.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-08 21:13:22 -08:00
Mike Welsh d27b46b3dc webgl: Clamp renderbuffer dimensions to sane values 2020-11-29 15:04:39 -08:00
Mike Welsh 53212f192c chore: Appease clippy, squelch unnecessary_wraps lint 2020-11-24 18:59:42 -08:00
Mike Welsh 4558be948e render: Fix masking issues on wgpu/webgl backends
Change the usage of the stencil buffer to avoid running out of
stencil bits when too many nested masks are active.

This also cleans things up on wgpu which requires us to make
pipeline states in advice; now we only need a few stencil states
for masking as opposed to hundreds.
2020-10-17 02:42:56 -07:00
Mike Welsh 253c231788 webgl: Don't panic when trying to draw unregistered bitmap
Avoids a panic in #1248.
2020-10-11 02:47:57 -07:00
Mike Welsh 3ddfd516d5 webgl: Set uniforms for all gradient colors
Was mistakenly not uploading all colors. Fixes #1240.
2020-09-29 14:02:25 -07:00
Mike Welsh 313b02d24f webgl: Fall back to canvas if not using hardware acceleration
Display WebGL driver info, detect whether hardware acceleration
is enabled, and fall back to the canvas backend in this case.
2020-09-25 01:22:21 -07:00
Mike Welsh b908b027a9 webgl: Handle errors in renderbuffer creation 2020-09-25 01:22:21 -07:00
Mike Welsh b8f9c5b0a3 webgl: Respect MAX_SAMPLES when creating MSAA buffers 2020-09-25 01:22:21 -07:00
Mike Welsh 816272e46b webgl: Bump max gradient count to 15 2020-09-24 22:55:17 -07:00
Luca Weiss d5cb396331 *: fix spelling mistakes 2020-09-19 16:17:58 -07:00
Nathan Adams e008603426 core: Add draw_rect to the render backend API 2020-09-17 16:03:16 -07:00
Mike Welsh 4190b1fc14 render: Backends use shape_utils::swf_glyph_to_shape 2020-09-15 02:34:32 -07:00
dependabot-preview[bot] 5a85558135 build(deps): bump web-sys from 0.3.44 to 0.3.45
Bumps [web-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.44 to 0.3.45.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-11 18:29:47 -07:00
dependabot-preview[bot] 644a9107a1 build(deps): bump js-sys from 0.3.44 to 0.3.45
Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.44 to 0.3.45.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-09 11:00:07 -07:00
dependabot-preview[bot] 7017584cf6 build(deps): bump web-sys from 0.3.42 to 0.3.44
Bumps [web-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.42 to 0.3.44.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-30 01:09:48 -07:00
dependabot-preview[bot] 76ae11c979 build(deps): bump js-sys from 0.3.42 to 0.3.44
Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.42 to 0.3.44.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-29 10:42:25 -07:00
dependabot-preview[bot] 0bd7f07649 build(deps): bump png from 0.16.6 to 0.16.7
Bumps [png](https://github.com/image-rs/image-png) from 0.16.6 to 0.16.7.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/compare/v0.16.6...v0.16.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-18 12:36:46 -07:00
dependabot-preview[bot] 182c9ed869 build(deps): bump web-sys from 0.3.41 to 0.3.42
Bumps [web-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.41 to 0.3.42.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-16 16:40:47 -07:00
dependabot-preview[bot] 7dd26bf771 build(deps): bump js-sys from 0.3.41 to 0.3.42
Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.41 to 0.3.42.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-15 11:52:53 -07:00
dependabot-preview[bot] b1f704b415 build(deps): bump wasm-bindgen from 0.2.64 to 0.2.65
Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.64 to 0.2.65.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.64...0.2.65)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-15 11:51:09 -07:00
dependabot-preview[bot] 328246dc10 build(deps): bump jpeg-decoder from 0.1.19 to 0.1.20
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.1.19 to 0.1.20.
- [Release notes](https://github.com/image-rs/jpeg-decoder/releases)
- [Changelog](https://github.com/image-rs/jpeg-decoder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/image-rs/jpeg-decoder/compare/v0.1.19...v0.1.20)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-04 15:29:45 -07:00
Mike Welsh 03883a6be0 chore: Bump wasm-bindgen, js-sys, web-sys 2020-06-30 17:19:42 -07:00
dependabot-preview[bot] 82a86d6139 build(deps): bump png from 0.16.5 to 0.16.6
Bumps [png](https://github.com/image-rs/image-png) from 0.16.5 to 0.16.6.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-27 16:08:11 -07:00
dependabot-preview[bot] fcea6012bb build(deps): bump png from 0.16.4 to 0.16.5
Bumps [png](https://github.com/image-rs/image-png) from 0.16.4 to 0.16.5.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/compare/v0.16.4...v0.16.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-13 18:52:24 -07:00
dependabot-preview[bot] cf4df4058f build(deps): bump png from 0.16.3 to 0.16.4
Bumps [png](https://github.com/image-rs/image-png) from 0.16.3 to 0.16.4.
- [Release notes](https://github.com/image-rs/image-png/releases)
- [Changelog](https://github.com/image-rs/image-png/blob/master/CHANGES.md)
- [Commits](https://github.com/image-rs/image-png/compare/v0.16.3...v0.16.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 12:23:21 -07:00
dependabot-preview[bot] fea9257205 build(deps): bump web-sys from 0.3.39 to 0.3.40
Bumps [web-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.39 to 0.3.40.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-28 09:40:58 -07:00
Nathan Adams df6764a69c chore: Add license metadata to all packages & crates 2020-05-27 00:11:02 -07:00
Mike Welsh 09ca11f788 webgl: Implement linear RGB gradients 2020-05-22 11:03:16 -07:00
Nathan Adams eda862c719 swf: Merged core::Matrix into swf::Matrix 2020-05-20 14:54:41 +02:00
Nathan Adams 7ab6703fc9 render: Add RenderBackend::replace_shape method 2020-05-20 14:54:40 +02:00
Nathan Adams f7b5f14f65 core: Make RenderBack::register_bitmap* methods return a Result (fixes #531) 2020-05-19 07:12:36 -07:00
dependabot-preview[bot] 1f0e695465 build(deps): bump fnv from 1.0.6 to 1.0.7
Bumps [fnv](https://github.com/servo/rust-fnv) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/servo/rust-fnv/releases)
- [Commits](https://github.com/servo/rust-fnv/compare/v1.0.6...v1.0.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-14 19:05:48 +00:00
Mike Welsh 5d84d33710 render: Handle PNG data in DefineBitsJPEG tags (fix #530) 2020-05-13 00:15:09 -07:00
Nathan Adams c787e28fcd render: Introduce a DistilledShape and use that instead of swf::Shape for the rendering API 2020-05-10 22:03:56 -07:00
Nathan Adams 601715aa19 render: Merge begin_frame and clear as they're always called together 2020-05-10 22:03:56 -07:00
Mike Welsh cde7798ded webgl: Default MSAA to 4x, 2x on mobile/tablets
Also ensure we clamp MSAA at maximum available, in case the sample
count is not supported by the device.
2020-05-02 10:41:09 -07:00
Mike Welsh 6221065391 webgl: Store vertex attribute location per program 2020-05-02 10:39:40 -07:00
Mike Welsh caf421144a webgl: Don't change wrapping mode in WebGL1 2020-05-02 10:39:40 -07:00
Mike Welsh e58cca3287 webgl: Add WebGL2 MSAA support 2020-05-02 10:39:38 -07:00
Mike Welsh 23a42d4d8c webgl: Fix gradients
Tweak common_tess to return a more generic gradient type.
2020-05-02 10:38:55 -07:00
Mike Welsh bfe14c2eaf webgl: Add VAO support 2020-05-02 10:38:20 -07:00
Mike Welsh 9583b51ddb webgl: Use u32 for vertex color 2020-05-02 10:38:20 -07:00
Mike Welsh bc85c0d92e webgl: Avoid redundant WebGL state calls 2020-05-02 10:38:20 -07:00
Mike Welsh 5f45b25f27 webgl: Create a WebGL2 context when available 2020-05-02 10:38:20 -07:00
Mike Welsh d440328f1f webgl: Set more context attributes on creation 2020-05-02 10:38:20 -07:00
Mike Welsh fa5c09b0cd web: Add WebGL render backend 2020-05-02 10:38:18 -07:00