FullScreen API For Processing
v 0.94 (changes)
News!
I am a real library now, easier to install, easier to reuse.
Download me now!
Reference
new FullScreen(this)
Creates a new fullscreen object
fs.enter() / fs.leave()
Enters / leaves fullscreen mode.
fs.setResolution(x, y)
Changes the resolution if you are in fullscreen mode.
If not it memorizes the resolution and sets it the next time
you enter fullscreen mode.
By default it will try to use the sketch size as resolution.
Keyboard shortcuts
To enter/leave fullscreen mode
Windows: Alt+Enter, Ctrl+F
Linux: Ctrl+F
OS X: ⌘+F
ESC: leave fullscreen / exit application
Download & Install
Download the file
fullscreen.zip and
extract it to processing's libraries folder.
You can also download
fullscreen-src.zip
if you wanna take a look at the sourcecode. Remember: It's GPL, if you
make usefull changes let the world know about it!
Example Usage
import fullscreen.*;
FullScreen fs;
void setup(){
// set size to 640x480
size(640, 480);
// 5 fps
frameRate(5);
// Create the fullscreen object
fs = new FullScreen(this);
// enter fullscreen mode
fs.enter();
}
void draw(){
background(0);
fill(255, 0, 0);
for(int i = 0; i < 10; i++){
fill(
random(255),
random(255),
random(255)
);
rect(
i*10, i*10,
width - i*20, height - i*20
);
}
}
Warnings & Limitations
- Only works for applications (not for applets)
- This package conflicts with processings "present" option
- The ESC key exists the application, not fullscreen mode
- This size of the sketch can not be scaled to screen size in fullscreen mode
- Requires Java 1.4 to work
- It seems not every implementation of Java on Linux gives you
proper fullscreen support, you might not be able to switch
resolution
Feedback
Does this package work for you in OpenGL mode? Or do you lose fonts when
switching between fullscreen/windowed mode? Any other annoying things you
noticed? Suggestions? Leave a message!