From 461f114ad56cce7176d70748d1c49525c252d6bb Mon Sep 17 00:00:00 2001 From: Jonathan Behrens Date: Wed, 25 Dec 2019 21:42:49 -0500 Subject: [PATCH] Make Origin3d::{x,y,z} all have type u32 --- ffi/wgpu.h | 8 ++++---- wgpu-core/src/lib.rs | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ffi/wgpu.h b/ffi/wgpu.h index c1dca8491e..436d4021cb 100644 --- a/ffi/wgpu.h +++ b/ffi/wgpu.h @@ -349,11 +349,11 @@ typedef uint64_t WGPUId_Texture_Dummy; typedef WGPUId_Texture_Dummy WGPUTextureId; typedef struct { - float x; - float y; - float z; + uint32_t x; + uint32_t y; + uint32_t z; } WGPUOrigin3d; -#define WGPUOrigin3d_ZERO (WGPUOrigin3d){ .x = 0.0, .y = 0.0, .z = 0.0 } +#define WGPUOrigin3d_ZERO (WGPUOrigin3d){ .x = 0, .y = 0, .z = 0 } typedef struct { WGPUTextureId texture; diff --git a/wgpu-core/src/lib.rs b/wgpu-core/src/lib.rs index 2d96965566..f7537d1240 100644 --- a/wgpu-core/src/lib.rs +++ b/wgpu-core/src/lib.rs @@ -159,16 +159,16 @@ impl Color { #[repr(C)] #[derive(Clone, Copy, Debug)] pub struct Origin3d { - pub x: f32, - pub y: f32, - pub z: f32, + pub x: u32, + pub y: u32, + pub z: u32, } impl Origin3d { pub const ZERO: Self = Origin3d { - x: 0.0, - y: 0.0, - z: 0.0, + x: 0, + y: 0, + z: 0, }; }