Why does size() create different window sizes depending on whether P3D is used?

I just discovered that the size() function creates different window sizes depending on whether P3D is selected. When I called size(1024,600,P3D), the window size is about quarter of that when using size(1024,600) (no P3D). See the attached image.

Does anyone have any explanation for this behaviour?

Hi @jtbr,

I can’t reproduce it. For me both windows have the expected dimension.

Cheers
— mnse


1 Like

Hello @jtbr,

Which version of Processing?
What operating system?

Related discussions:

:)

Processing 4.2
Windows 10

I don’t know the graphics information will be useful.
NVIDIA RTX A2000 8GB
DirectX 12

Interestingly, when I added an external 7" monitor (1024 x 600) and moved the window (using size(1024,600,P3D)) to this monitor, it “became bigger” and actually fit to the full screen.

When I did the same without P3D, the window size was slightly smaller than the full screen.

I still have no explanation but I’m satisfied that size() with P3D option fits onto my target monitor.

my theory:

maybe you use a tablet/laptop computer?

maybe you told the internal monitor to be rotated 90° and processing can’t read this information and thus the width and height parameters in the size-command are swapped?

Chrisir

1 Like

Hi Chrisir,

Thank you. That’s a very good point.

My display setting is scaled to 250% by default. After more testing switching between 100% and 250%, I found that size(*,*,P3D) ignored the scale but size(*,*) followed the scale.

1 Like