Pad to improve WebGL support

This commit is contained in:
grovesNL 2022-06-06 15:09:14 -02:30 committed by Josh Groves
parent 73b2562179
commit bbc5f18cdd

View file

@ -100,6 +100,7 @@ pub struct Resolution {
#[derive(Clone, Copy, Debug, Eq, PartialEq)] #[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct Params { pub struct Params {
screen_resolution: Resolution, screen_resolution: Resolution,
_pad: [u32; 2],
} }
fn try_allocate(atlas: &mut TextAtlas, width: usize, height: usize) -> Option<Allocation> { fn try_allocate(atlas: &mut TextAtlas, width: usize, height: usize) -> Option<Allocation> {
@ -238,6 +239,7 @@ impl TextAtlas {
width: 0, width: 0,
height: 0, height: 0,
}, },
_pad: [0, 0],
}; };
let params_buffer = device.create_buffer(&BufferDescriptor { let params_buffer = device.create_buffer(&BufferDescriptor {