-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add polygon_mode: PolyonMode
to RasterizationStateDescriptor
to allow drawing wireframes
#921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an autogenerated code review.
Checker summary (by rust_clippy):
The tool has found 0 warnings, 1 errors.
Thank you for the PR! This capability is not a part of upstream API: https://gpuweb.github.io/gpuweb/ It means that we can only expose it as a native-only extension. |
Would this mean integrating it with the extension mechanism implemented in #690? Is there anything else I should be aware of? |
You'd add a bit to Line 148 in 7303131
ALL_NATIVE range.
|
And you'd only expose it if gfx-hal exposes |
Thanks for the info, I'll give it a shot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an autogenerated code review.
Checker summary (by rust_clippy):
The tool has found 0 warnings, 1 errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Could you squash it please?
I added the feature flag, trying to mirror the other flags. I pushed a branch of wgpu-rs that modifies the cube example to test line fill mode here: Let me know if I missed anything! I see the build is failing due to the new LabeledContextError, I'll rebase and squash. |
e1a7357
to
0c24eb5
Compare
@@ -611,6 +641,7 @@ impl Default for CullMode { | |||
pub struct RasterizationStateDescriptor { | |||
pub front_face: FrontFace, | |||
pub cull_mode: CullMode, | |||
pub polygon_mode: PolygonMode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This member should have a comment on it saying it can only be non-fill with the feature on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I added the docs.
…llow drawing wireframes
0c24eb5
to
336d070
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
bors r+
Build succeeded: |
Thanks for the great and "realtime" feedback! |
Please join us for even more real time feedback on "#wgpu:matrix.org"! |
559: Update wgpu with the polygon modes support, use in the cube example r=cwfitzgerald a=kvark Uses gfx-rs/wgpu#921, cc @manuel-woelker Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
559: Update wgpu with the polygon modes support, use in the cube example r=cwfitzgerald a=kvark Uses gfx-rs#921, cc @manuel-woelker Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
921: Update wgpu to eadaa1b r=kvark a=kvark Picks up gfx-rs#1419, gfx-rs#1417, and gfx-rs#1403 Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Description
This adds
polygon_mode: PolyonMode
toRasterizationStateDescriptor
to allow drawing in wireframes and point modeI added
hal::Features::NON_FILL_POLYGON_MODE
to thewishful_features
ininstance.rs
. I don't know what side effects this might have.Testing
Tested locally on my Windows machine with Vulkan backend.