gpu: add PrimitiveTopology enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
327b0f9257
commit
c91fd182ce
2 changed files with 8 additions and 9 deletions
|
|
@ -1,14 +1,5 @@
|
||||||
typedef uint32_t WGPUFlags;
|
typedef uint32_t WGPUFlags;
|
||||||
|
|
||||||
typedef enum WGPUPrimitiveTopology {
|
|
||||||
WGPUPrimitiveTopology_PointList = 0x00000000,
|
|
||||||
WGPUPrimitiveTopology_LineList = 0x00000001,
|
|
||||||
WGPUPrimitiveTopology_LineStrip = 0x00000002,
|
|
||||||
WGPUPrimitiveTopology_TriangleList = 0x00000003,
|
|
||||||
WGPUPrimitiveTopology_TriangleStrip = 0x00000004,
|
|
||||||
WGPUPrimitiveTopology_Force32 = 0x7FFFFFFF
|
|
||||||
} WGPUPrimitiveTopology;
|
|
||||||
|
|
||||||
typedef enum WGPUQueryType {
|
typedef enum WGPUQueryType {
|
||||||
WGPUQueryType_Occlusion = 0x00000000,
|
WGPUQueryType_Occlusion = 0x00000000,
|
||||||
WGPUQueryType_PipelineStatistics = 0x00000001,
|
WGPUQueryType_PipelineStatistics = 0x00000001,
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,14 @@ pub const PresentMode = enum(u32) {
|
||||||
fifo = 0x00000002,
|
fifo = 0x00000002,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const PrimitiveTopology = enum(u32) {
|
||||||
|
point_list = 0x00000000,
|
||||||
|
line_list = 0x00000001,
|
||||||
|
line_strip = 0x00000002,
|
||||||
|
triangle_list = 0x00000003,
|
||||||
|
triangle_strip = 0x00000004,
|
||||||
|
};
|
||||||
|
|
||||||
test "BackendType name" {
|
test "BackendType name" {
|
||||||
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
|
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue