Fullscreen on a 2nd Monitor fails in macOS (P3D Renderer)

I’m attempting to run the following example which is based on the Processing Reference to run a sketch in fullscreen mode on a 2nd monitor. It works fine with the default renderer, however when I changed the fullScreen() call to specify the P3D renderer as below, the sketch fails to run and displays an error message. I’m on macOS 13.3.1.

Is there anyone out there who is using macOS able to get a second monitor running with the P3D renderer in fullscreen mode? Any help is greatly appreciated.

// from https://processing.org/reference/settings_.html

int x = 0;

void settings() {
  fullScreen(P3D,2);
}

void setup() {
  background(0);
  noStroke();
  fill(102);
}

void draw() {
  rect(x, height*0.2, 1, height*0.6); 
  x = x + 2;
}

The error is below:

OpenGL error 1286 at top beginDraw(): invalid framebuffer operation
OpenGL error 1286 at bot beginDraw(): invalid framebuffer operation
OpenGL error 1286 at top endDraw(): invalid framebuffer operation
java.lang.RuntimeException: Cannot validate shader program:
Validation Failed: Current draw framebuffer is invalid.

	at processing.core.PGraphics.showException(PGraphics.java:8327)
	at processing.opengl.PShader.validate(PShader.java:954)
	at processing.opengl.PShader.init(PShader.java:911)
	at processing.opengl.PShader.getAttributeLoc(PShader.java:604)
	at processing.opengl.PShader.loadAttributes(PShader.java:1126)
	at processing.opengl.PGraphicsOpenGL.getPolyShader(PGraphicsOpenGL.java:7066)
	at processing.opengl.PGraphicsOpenGL.flushPolys(PGraphicsOpenGL.java:2343)
	at processing.opengl.PGraphicsOpenGL.flush(PGraphicsOpenGL.java:2280)
	at processing.opengl.PGraphicsOpenGL.endDraw(PGraphicsOpenGL.java:1447)
	at processing.core.PApplet.handleDraw(PApplet.java:2111)
	at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:840)
	at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
	at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
	at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
	at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
	at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:782)
	at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
	at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:453)
	at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
	at java.base/java.util.TimerThread.run(Timer.java:516)
RuntimeException: Cannot validate shader program:
Validation Failed: Current draw framebuffer is invalid.

RuntimeException: Cannot validate shader program:
Validation Failed: Current draw framebuffer is invalid.

Hi,

macbook m1, macos 13.3 , processing 4.2 here,
external screen is connected via a usbc to vga adaptater

the sketch run without error message, display well but… not on the external monitor: whatever the option is set or not, set to 1 or 2, it launch on the internal screen
i tried to force it with the “Run sketches on display x” set on processing “preferences” but it stick to main monitor.