Skip to content
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

Better error message when render is used without wgpu. #626

Closed
entropylost opened this issue Oct 5, 2020 · 4 comments
Closed

Better error message when render is used without wgpu. #626

entropylost opened this issue Oct 5, 2020 · 4 comments
Labels
A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@entropylost
Copy link
Contributor

I think there should be a better error message when the render plugin is used without wgpu. The current error message is very unhelpful (see below), and could be improved.

thread 'thread 'Compute Task Pool (2)Compute Task Pool (1)' panicked at '' panicked at 'Resource does not exist alloc::boxed::Box<dyn bevy_render::renderer::render_resource_context::RenderResourceContext>Resource does not exist alloc::boxed::Box<dyn bevy_render::renderer::render_resource_context::RenderResourceContext>', ', C:\Users\____\.cargo\registry\src\github.com-1ecc6299db9ec823\bevy_ecs-0.2.1\src\resource\resources.rsC:\Users\____\.cargo\registry\src\github.com-1ecc6299db9ec823\bevy_ecs-0.2.1\src\resource\resources.rs::175175::3232

I would suggest panicking with an error message like "Render backend not found. Currently, the render plugin needs the wgpu plugin to be supported; maybe that should be enabled?"

@GabCampbell GabCampbell added the C-Feature A new feature, making something new possible label Oct 5, 2020
@GabCampbell
Copy link
Contributor

Seems like a good point. Developer experience should definitely be a top priority. Thanks for the suggestion. Do you have a suggested implementation for this feature?

@DJMcNab
Copy link
Member

DJMcNab commented Oct 5, 2020

See also #622

@entropylost
Copy link
Contributor Author

@GabLotus I don't actually know how bevy works at all, so no. Also, it seems that CorePlugin has a dependency on TypeRegistryPlugin, which should also be fixed. (also which plugin has the event loop...)

@memoryruins
Copy link
Contributor

it seems that CorePlugin has a dependency on TypeRegistryPlugin, which should also be fixed.

It uses the RegisterType trait for the plugin
https://docs.rs/bevy_type_registry/0.2.1/bevy_type_registry/trait.RegisterType.html

.register_component::<Timer>()
.register_property::<Vec2>()
.register_property::<Vec3>()

also which plugin has the event loop

The high-level runner is in bevy_app, which either uses bevy_app::ScheduleRunner or bevy_winit::winit_runner if there is windowing.

@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Rendering Drawing game state to the screen D-Trivial Nice and easy! A great choice to get started with Bevy and removed C-Feature A new feature, making something new possible labels Feb 17, 2021
@bors bors bot closed this as completed in ad43f52 Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants