From 2890aa48ea922c21184a5b1837091ea6494ad619 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 15 Jul 2022 00:40:23 -0700 Subject: [PATCH] gpu: add Color type Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 7 ------- gpu/src/types.zig | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 6ae0ab36..1c093311 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -13,13 +13,6 @@ typedef struct WGPUBufferDescriptor { bool mappedAtCreation; } WGPUBufferDescriptor; -typedef struct WGPUColor { - double r; - double g; - double b; - double a; -} WGPUColor; - typedef struct WGPUCommandBufferDescriptor { WGPUChainedStruct const * nextInChain; char const * label; // nullable diff --git a/gpu/src/types.zig b/gpu/src/types.zig index a72cfce5..3c2d84c2 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -380,6 +380,13 @@ pub const BlendComponent = extern struct { dst_factor: BlendFactor = .zero, }; +pub const Color = extern struct { + r: f64, + g: f64, + b: f64, + a: f64, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }