kaphula / winit-egui-wgpu-template

Starter template for winit, egui and wgpu project.
MIT License
22 stars 2 forks source link

Resizing window does not resize background #1

Closed AustinHellerRepo closed 4 months ago

AustinHellerRepo commented 4 months ago

When trying to resize the window the black background maintains the same size. I am trying to debug the issue myself, but I haven't yet succeeded, so I figured that I'd submit this issue in the meantime while I continue to figure out what's wrong.

kaphula commented 4 months ago

Can you be more specific what is exactly the issue? Nothing is being drawn on the background so I don't understand how resizing can be even observed. I modified the example to show how pixels per scaling can be adjusted so that the egui window size can be resized.

AustinHellerRepo commented 4 months ago

Sorry for the lack of details. I have provided screenshots below of the result when I resize the window to be slightly smaller and slightly larger than the original size. It leaves the black background the same size. If I resize to be larger than the initial window size, there is a gap that appears to let me see through the window. image image

kaphula commented 4 months ago

I see. What OS are you running? I pushed a new commit that resizes the surface when window resize event happens, please try that and see what happens. I think this should fix the issue.

AustinHellerRepo commented 4 months ago

That fixed it! Thanks! I'm running Ubuntu 22.04.4 LTS btw.