Skip to content

Commit

Permalink
Update wgpu_integration.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Mar 16, 2024
1 parent 5a277cb commit 6a236a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/eframe/src/native/wgpu_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,10 @@ impl WgpuWinitRunning {
if let Some(parent_viewport) = viewports.get(&viewport.ids.parent) {
let is_deferred_parent = parent_viewport.viewport_ui_cb.is_some();
if is_deferred_parent {
// This will only happens when the parent has a Deferred Viewport.
// This will only happens when the parent is a Deferred Viewport.
viewport_id = parent_viewport.ids.this;
} else if let Some(root_viewport) = viewports.get(&ViewportId::ROOT) {
// This will only happen when the parent has a Immediate Viewport.
// This will only happen when the parent is a Immediate Viewport.
// That means that the viewport cannot be rendered by itself and needs his parent to be rendered.
viewport_id = root_viewport.ids.this;
} else {
Expand Down

0 comments on commit 6a236a7

Please sign in to comment.