#Bevy Rendering errors on firefox

2 messages · Page 1 of 1 (latest)

quartz mural
#
Failed to create wgpu surface: CreateSurfaceError { inner: Hal(FailedToCreateSurfaceForAnyBackend({})) }```

Looking to get my game up on the web, I've got all the server/hosting setup at https://brickpong.io however I'm getting the above error on Firefox and others.

Any thoughts on the Rendering setup for bevy to ensure fallback to WebGL?

Here's my setup

pub fn create_app(){
let mut app = App::default();
app
.insert_resource(ClearColor(Color::BLACK))
.enable_state_scoped_entities::<GameState>()
.add_plugins(
(
DefaultPlugins.set(
RenderPlugin {

                #[cfg(not(feature = "web"))]
                render_creation: RenderCreation::Automatic(WgpuSettings {
                    backends:Some(
                        Backends::VULKAN |
                        Backends::METAL |
                        Backends::BROWSER_WEBGPU|
                        Backends::GL
                    ),
                ..default()
                }),
                ..default()
            },
        ).set(
            WindowPlugin {
                primary_window: Some(Window {
                    fit_canvas_to_parent:true,
                    // #[cfg(target_arch = "wasm32")]
                    // canvas: Some("#game".into()),
                    prevent_default_event_handling: false,
                    ..default()
                }),
                ..default()
            }),
            

        ScreenDiagnosticsPlugin::default(),
        ScreenFrameDiagnosticsPlugin,
        //
        InGamePlugin,
        NetworkingPlugin,
    ))
    .add_systems(Startup, setup);

app
    .run();

}```

wary frigate
#

I don't think it's currently possible to compile bevy with both webgl and webgpu support.