Skip to content

Dependency between render and wgpu? #622

@entropylost

Description

@entropylost

For some reason, if I enable the render plugin, I also must have the wgpu plugin enabled.

For example,

[package]
name = "bevy-test"
version = "0.1.0"
edition = "2018"
[dependencies]
[dependencies.bevy]
version = "^0.2.1"
# git = "https://github.com/bevyengine/bevy"
default-features = false
features = [
    "bevy_audio",
    "bevy_gilrs",
    "bevy_gltf",
    "bevy_winit",
    "render",
    "png",
    "hdr",
    "mp3",
    "x11",
]

If I put this in Cargo.toml and run a simple main method (App::build().add_default_plugins().run()), it throws this error:

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.202132.xyz-1ecc6299db9ec823\bevy_ecs-0.2.1\src\resource\resources.rsC:\Users\____\.cargo\registry\src\github.202132.xyz-1ecc6299db9ec823\bevy_ecs-0.2.1\src\resource\resources.rs::175175::3232

I don't see any reason to have render depend on wgpu as if I understand the code correctly render uses gfx-hal. If it is an intentional feature, it would be helpful to have a better error message or auto-enable wgpu when render is enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Build-SystemRelated to build systems or continuous integrationA-RenderingDrawing game state to the screenC-FeatureA new feature, making something new possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions