wgpu_macros

Crates.iowgpu_macros
lib.rswgpu_macros
version0.1.0
sourcesrc
created_at2022-03-21 22:02:01.319833
updated_at2022-03-21 22:02:01.319833
descriptionA set of useful proc macros for wgpu
homepage
repositoryhttps://github.com/crowlKats/wgpu-macros
max_upload_size
id554357
size12,251
Leo Kettmeir (crowlKats)

documentation

README

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).

Commit count: 10

cargo fmt