From bbc5f18cdd829016b8ba628eab381e6ecdf97567 Mon Sep 17 00:00:00 2001 From: grovesNL Date: Mon, 6 Jun 2022 15:09:14 -0230 Subject: [PATCH] Pad to improve WebGL support --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index c0cbafa..91a9e82 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -100,6 +100,7 @@ pub struct Resolution { #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct Params { screen_resolution: Resolution, + _pad: [u32; 2], } fn try_allocate(atlas: &mut TextAtlas, width: usize, height: usize) -> Option { @@ -238,6 +239,7 @@ impl TextAtlas { width: 0, height: 0, }, + _pad: [0, 0], }; let params_buffer = device.create_buffer(&BufferDescriptor {