-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Enable wgpu device features and limits #1401
Conversation
"getting stuck" is not the right way to call my PR, but I dont mind - @cart can pick which one he wants use. |
Cool I'll do a review of both in the near future. |
I was initially inclined to merge this pr as it also includes wgpu limits and the api is a closer match to Wgpu. I also like how this pr includes WgpuFeatures inside of WgpuOptions. However #547 has the desirable behavior of breaking when the wgpu bitflags change (ex: a flag is renamed or removed). A list of enums is also more serialization-friendly, and there is a world where we move to "serialized" plugin configuration for the Bevy Editor. I think I'll merge #547 (with DeviceFeatures merged into WgpuOptions), but it would be awesome if this pr could be adapted to account for #547 so we can get the nice WgpuLimits config too. |
This PR implements wireframe rendering. Usage: This is now ready as soon as #1401 gets merged. Usage: ```rust app .insert_resource(WgpuOptions { name: Some("3d_scene"), features: WgpuFeatures::NON_FILL_POLYGON_MODE, ..Default::default() }) // To enable the NON_FILL_POLYGON_MODE feature .add_plugin(WireframePlugin) .run(); ``` Now we just need to add the Wireframe component on an entity, and it'll draw. its wireframe. We can also enable wireframe drawing globally by setting the global property in the `WireframeConfig` resource to `true`. Co-authored-by: Zhixing Zhang <me@neoto.xin>
Alternative implementation to #547.
This PR also added
WgpuFeatures
,name
, andWgpuLimits
toWgpuOptions
. Additionally, it also re-exported certain wgpu render resource limit constants.This is ready for review.