When trying to plot a point in the centre of the window, I realized that conversion from the [0,1] coordinates of the simulation to the screen coordinates was not working properly.
For instance I would have that kind of result when trying to display the particles within a square centered in the window:
I would for instance ask for a 600x600 window, but the debugger reported width and height of 900.
I found out that this came from a scaling that Windows applies to some displays.
For instance, on my laptop, in Settings > System > Display > Scale and Layout, I had a 150% scaling factor.
This can be fixed by adding a scaler to your app, and could then look something like that:
When trying to plot a point in the centre of the window, I realized that conversion from the [0,1] coordinates of the simulation to the screen coordinates was not working properly.
For instance I would have that kind of result when trying to display the particles within a square centered in the window: I would for instance ask for a 600x600 window, but the debugger reported width and height of 900.
I found out that this came from a scaling that Windows applies to some displays. For instance, on my laptop, in Settings > System > Display > Scale and Layout, I had a 150% scaling factor. This can be fixed by adding a scaler to your app, and could then look something like that: