Commit Graph

72 Commits

Author SHA1 Message Date
relrelb 7410495a6c web: Fix repeating bitmap textures rendering 2021-03-10 20:48:16 -08:00
Mike Welsh 3099914374 chore: Appease clippy 2021-02-27 16:10:46 -08:00
Mike Welsh e5fb1f09e7 chore: Appease clippy
* #[derive(Collect)] should be before #[collect]
 * Replace redunant `&buf[..]` with `buf`
 * Changes most cases of UPPERCase to UpperCase
 * Allow upper_case_acronym on most SWF types, as they are from
   SWF spec/more annoying to change.
2021-02-12 06:32:42 -08:00
Mike Welsh 48e1afc054 webgl: Use highp precision when available
Fixes issues relating to text rendering (#900) and other artifacts
on iOS.
2021-02-02 16:14:15 -08:00
dependabot-preview[bot] 6f14490f84 build(deps): bump jpeg-decoder from 0.1.21 to 0.1.22
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.1.21 to 0.1.22.
- [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.21...v0.1.22)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-29 11:42:19 -08:00
Mike Welsh 44bfd46bf9 chore: Lock wasm-bindgen and wasm-bindgen-cli to 0.2.69 2021-01-25 12:27:21 -08:00
dependabot-preview[bot] 239ccb3511 build(deps): bump jpeg-decoder from 0.1.20 to 0.1.21
Bumps [jpeg-decoder](https://github.com/image-rs/jpeg-decoder) from 0.1.20 to 0.1.21.
- [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/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-24 11:52:39 -08:00
Mike Welsh 09a48a71d8 render: Avoid asserts in masking state
Switch to debug_assert! instead of assert! in mask checks to avoid
panicking (#1347). This will render incorrectly and still needs
to be fixed, but we should fail gracefully and avoid killing the
entire player.
2021-01-14 14:18:14 -08:00
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