displayWidth: deprecation?

Hello All,
coming back to Processing after a while. Actually I haven’t dealt much with 3.0 (it was already out when I still had my hands in 2.0, but all my sketches were 2.0 and I stuck there, being too lazy for rewrites) and a few things have changed indeed.
I’ve seen in a post on the old forum describing how physical display variables displayWidth and displayHeight have been deprecated. How is one supposed to get display devices’ physical dimensions in 3.0?

OK. So they’re not deprecated. I must have misunderstood. What is then? Is it the use of them in combination with size()?

Processing.org/reference/settings_.html

1 Like

OK thanks GoToLoop, now I got it. We’re just required not to use variables in size(). Since I almost always make fullscreen sketches, I used to use size(displayWidth, displayHeight) a lot.

1 Like

For that use case specifically there is a new function: fullScreen.

This function is new for Processing 3.0. It opens a sketch using the full size of the computer’s display. This function must be the first line in setup() . The size() and fullScreen() functions cannot both be used in the same program, just choose one. Reference / Processing.org

1 Like

Yep. All clear now. I’ve also discovered that you can set the drawing engine using fullScreen(), for example like so: fullScreen(P3D)

What got me confused in the first place was this post from the old forum. It states clearly that displayWidth and its brother are deprecated. And GoToLoop makes a perfect point about users wondering about how new versions take useful stuff away.

EDIT: my point here is, although that post states deprecation, there actually isn’t any when talking about displayWidth. What’s deprecated is the use of variables as parameters in function size().

2 Likes