DioxusLabs / DioxusLabs/dioxus

Error when running the wgpu child window example

Open
#4,334 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

Error when running the [wgpu child window](https://github.com/DioxusLabs/dioxus/blob/6cc379718b59184746138d66fcc5f47a6810b3ac/examples/wgpu_child_window.rs) example on Ubuntu 24.04 (Dioxus version 0.7.0-alpha.1):

```
thread 'main' panicked at /home/jeromecaucat/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/wgpu-0.19.4/src/backend/wgpu_core.rs:724:18:
Error in Surface::configure: Validation Error

Caused by:
Requested alpha mode PostMultiplied is not in the list of supported alpha modes: [Opaque, PreMultiplied]
```

I tried with Dioxus version 0.6.3, but then I encounter https://github.com/DioxusLabs/dioxus/issues/3498.

I also tried changing the `alpha_mode` to `Opaque` and `PreMultiplied`, it runs without error but the 3D is rendered on top of the window, hiding its borders and content, which seems to correspond to this comment: https://github.com/DioxusLabs/dioxus/issues/3498#issuecomment-2697790529.

**Steps To Reproduce**

Steps to reproduce the behavior:

- `cargo build --examples --features=desktop,gpu`
- `./target/debug/examples/wgpu_child_window`

**Expected behavior**

Working example.

**Environment:**

- Dioxus version: 0.7.0-alpha.1
- Rust version: 1.88.0
- OS info: Ubuntu 24.04.2 LTS
- App platform: desktop

**Questionnaire**

I'm interested in fixing this myself but don't know where to start.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.