1 unstable release

0.1.0 Mar 21, 2022

#22 in #become

Download history 2/week @ 2024-11-13 7/week @ 2024-11-20 5/week @ 2024-11-27 9/week @ 2024-12-04 15/week @ 2024-12-11 2/week @ 2024-12-18 14/week @ 2025-02-05 32/week @ 2025-02-12 6/week @ 2025-02-19 7/week @ 2025-02-26

59 downloads per month

Custom license

10KB
150 lines

wgpu-macros

A set of useful proc macros for wgpu.

VertexLayout derive macro

Generates a wgpu::VertexBufferLayout, accessible through a LAYOUT constant on the struct.

There is an additional layout helper attribute macro that can be specified on the struct, which allows specifying the step_mode. Possible values are Vertex & Instance, and by default, the value is Vertex.

The layout helper attribute macro also can be used on individual fields to either override the generated VertexFormat by specifying a VertexFormat variant, or to specify if the norm version of the generated VertexFormat should be used (so Uint8 becomes Unorm8).

Dependencies

~1.5MB
~38K SLoC