gpu: add Color type

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-15 00:40:23 -07:00 committed by Stephen Gutekanst
parent 2ec3496478
commit 2890aa48ea
2 changed files with 7 additions and 7 deletions

View file

@ -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

View file

@ -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());
}