Calling smooth() on a createGraphics layer causes an error to log to the console

Here's the snippet that I ran:
let pg;
function setup() {
createCanvas(windowWidth, windowHeight, WEBGL);
pg = createGraphics(400, 400, WEBGL);
pg.smooth();
}
It looks like this has something to do with https://github.com/processing/p5.js/pull/3552 and the way that attributes are setup before the drawing context is created.
There's another related but maybe slightly separate issue where if you call smooth on a regular (not webGL) creategraphics layer a warning will be logged by mistake.
let pg;
function setup() {
createCanvas(windowWidth, windowHeight, WEBGL);
pg = createGraphics(400, 400);
pg.smooth();
}
You are trying to use setAttributes on a p5.Graphics object that does not use a WEBGL renderer.
Ah yes I forgot about graphics objects and smooth when I was working on the having the attributes exist before creating the context. I will take care of this next week. Thank you for finding this!
Most helpful comment
Ah yes I forgot about graphics objects and smooth when I was working on the having the attributes exist before creating the context. I will take care of this next week. Thank you for finding this!