LearnWebGPU-Code icon indicating copy to clipboard operation
LearnWebGPU-Code copied to clipboard

Shrinking automatically when drawing triangle

Open rollschild opened this issue 2 years ago • 1 comments

Hi,

I'm on step030 - Triangle and running into the issue where the surface automatically shrinks as long as it starts drawing the triangle.

Here is a GIF, hopefully it's clear enough: triangle

As you can see (sorry if it still flashes too fast, I did my best to slow it down), I was able to draw it and at first it was the original size (640x480) but shortly after it started to draw the triangle it automatically shrank to a much smaller size. This really puzzles me.

I'm using wgpu as backend and it's on Wayland.

Thanks!

rollschild avatar Jun 16 '23 03:06 rollschild

This is hard for me to reproduce, can it be your window manager doing weird things with DPI settings? If you can check whether glfwGetWindowSize changes in your main loop, also I think GLFW has some getters about DPI/pixel density that you may want to check.

eliemichel avatar Jul 06 '23 06:07 eliemichel