Look Ma, No Windows!

How to export a processing application full-screen:

p5 fullscreen

I’ve received several inquiries regarding how to make a Processing exported application run fullscreen. . . Here are a few simple steps and some code (using my Mandelbrot example). . . More information can be found in the Processing FAQ.

Step #1:
In order to auto-launch in “present” mode, you must write your own “main” function and specify the relevant arguments:

static public void main(String args[]) {
PApplet.main(new String[] { “–present”, “–display=1″, “mandelbrot” });
}

There are various arguments you can provide for the main method, and you can read full documentation here. (In this case, ‘present’ means run in present mode, ‘display=1′ indicates use the default display, and ‘mandelbrot’ is the name of the main class.)

Also, if you want to application to run at really really really full screen, simply set the size to screen.width x screen.height, i.e.:

size(screen.width,screen.height);

(Use the above code with caution, if your screen resolution is very large, slowness may ensue. . .)

Application and Source for Example:
Mac Version
Windows Version
Linux Version


2 Responses to “Look Ma, No Windows!”  

  1. 1 Shawn

    Strange that display starts at 1. That can be a gotcha..

  2. 2 }str

    totally!!

    that’s a harsh code :)

Leave a Reply