Skip to content

adds size function for VertexFormat#802

Merged
bors[bot] merged 2 commits intogfx-rs:masterfrom
bootra-dev:vertex-format-size
Jul 16, 2020
Merged

adds size function for VertexFormat#802
bors[bot] merged 2 commits intogfx-rs:masterfrom
bootra-dev:vertex-format-size

Conversation

@bootra-dev
Copy link
Copy Markdown
Contributor

Addresses #801

This PR adds a simple size function to the VertexFormat enum. It returns a u64 so that it can be conveniently used with the VertexAttributeDescriptor offset.

@bootra-dev
Copy link
Copy Markdown
Contributor Author

Woops, I forgot to change the default commit message -_-

Copy link
Copy Markdown
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
please change the commit message and maybe address the suggestion

@kvark
Copy link
Copy Markdown
Member

kvark commented Jul 16, 2020

Oh, another thing - can we remove the https://github.com/gfx-rs/wgpu-rs/blob/9f868cd2cba28db334f25272f672bd05e3e52866/src/macros.rs#L37 macro and just call the function you are adding instead?
I like as little macros as possible :)

Copy link
Copy Markdown
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful, thank you!
bors r+

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Jul 16, 2020

@bors bors bot merged commit d904598 into gfx-rs:master Jul 16, 2020
bors bot added a commit to gfx-rs/wgpu-rs that referenced this pull request Jul 21, 2020
442: replace vertex_format_size macro with VertexFormat size function r=kvark a=bootra-dev

This pull request depends on gfx-rs/wgpu#802

I'm not sure if multiple pull requests is the right way to handle this - let me know if I need to use another workflow.

Co-authored-by: bootra-dev <bootragames@gmail.com>
@bootra-dev bootra-dev deleted the vertex-format-size branch July 22, 2020 15:21
kvark pushed a commit to kvark/wgpu that referenced this pull request Jun 3, 2021
442: replace vertex_format_size macro with VertexFormat size function r=kvark a=bootra-dev

This pull request depends on gfx-rs#802

I'm not sure if multiple pull requests is the right way to handle this - let me know if I need to use another workflow.

Co-authored-by: bootra-dev <bootragames@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants