diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 57982a0f..e3ceb6b7 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,22 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUBlendFactor { - WGPUBlendFactor_Zero = 0x00000000, - WGPUBlendFactor_One = 0x00000001, - WGPUBlendFactor_Src = 0x00000002, - WGPUBlendFactor_OneMinusSrc = 0x00000003, - WGPUBlendFactor_SrcAlpha = 0x00000004, - WGPUBlendFactor_OneMinusSrcAlpha = 0x00000005, - WGPUBlendFactor_Dst = 0x00000006, - WGPUBlendFactor_OneMinusDst = 0x00000007, - WGPUBlendFactor_DstAlpha = 0x00000008, - WGPUBlendFactor_OneMinusDstAlpha = 0x00000009, - WGPUBlendFactor_SrcAlphaSaturated = 0x0000000A, - WGPUBlendFactor_Constant = 0x0000000B, - WGPUBlendFactor_OneMinusConstant = 0x0000000C, - WGPUBlendFactor_Force32 = 0x7FFFFFFF -} WGPUBlendFactor; - typedef enum WGPUBlendOperation { WGPUBlendOperation_Add = 0x00000000, WGPUBlendOperation_Subtract = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 7c96e4f4..e1e392a7 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -26,3 +26,19 @@ pub fn backendTypeName(t: BackendType) []const u8 { .opengles => "OpenGLES", }; } + +pub const BlendFactor = enum(u32) { + zero = 0x00000000, + one = 0x00000001, + src = 0x00000002, + one_minus_src = 0x00000003, + src_alpha = 0x00000004, + one_minus_src_alpha = 0x00000005, + dst = 0x00000006, + one_minus_dst = 0x00000007, + dst_alpha = 0x00000008, + one_minus_dst_alpha = 0x00000009, + src_alpha_saturated = 0x0000000A, + constant = 0x0000000B, + one_minus_constant = 0x0000000C, +};