FullScreen API For Processing v 0.98.3 (changes)

Download!

Hey there! I am a library for Processing for better fullscreen support. Download me now!  → all versions
p.s. i do crash sometimes. if you think you can help just send me a message in the processing discourse section.


Javadocs

Online javadoc reference here.


Short Reference

fs = new FullScreen(this)
Creates a new fullscreen object.
fs = new SoftFullScreen(this)
Will create a big window without frames that overlays the screen. This will allow you create a sketch that is dual screen. However, be aware that you'll have to disable screensaver, app notifications and active corners yourself! Also you won't be able to change the resolution.

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.
fs.setShortcutsEnabled(true/false)
Enables/disables keyboard shortcuts.

To enter/leave fullscreen mode
Windows: Alt+Enter, Ctrl+F
Linux: Ctrl+F
OS X: ⌘+F
ESC: leave fullscreen / exit application

Shortcuts are enabled by default!

Install

Download the file fullscreen.zip and extract it to <processing-sketches>/libraries/.

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);
  
  // Do your fancy drawing here...
  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
    ); 
  }
}


Feedback

Does the fullscreen api sometimes make your sketch crash? Do you wish it'd be easier to use? Any other annoying things you noticed? Suggestions? Or are you just happy? Leave a message!

31 Jul 2009, 20:23 sascha thanks for the library! looking forward to seeing progress in OPENGL support! we definately need this! thanks!
21 Sep 2009, 13:47 cristian I am trying to install on a computer with a panasonic digital projector connected. Although FullScreen can read the resolutions and knows the projector is there as screen number 1, I cant get the sketch to displaz on the chosen monitor. It always defaults to the main screen (0) and the second screen is black (1)

Its a real headache for me right now, any help appreciated

// very basic demonstration of the fullscreen api's capabilities
import fullscreen.*;

FullScreen fs;

void setup(){
size(screen.width, screen.height);


// 5 fps
frameRate(5);

// Create the fullscreen object
fs = new FullScreen(this, 1);

// enter fullscreen mode

fs.setResolution(1920,1080);
println (screen.width);
fs.setFullScreen(true);

}
17 Oct 2009, 15:07 hansi @christian - odd... do you have *any* output on the command line?
15 Nov 2009, 18:51 hansi, http://www.superduper.org releasing update next week. for now please try the test-version (at the top of the screen)...
there's won't be many changes, just want to wait a little more if crazy bugs arise.
21 Nov 2009, 03:06 JF There is no bug. Thats nice. Thanks for the lib friend :)

May i ask a question ? :)
-is it possible (not in your lib... im juste asking) to show the applet, only on the second screen?
26 Nov 2009, 16:28 hansi @JF -
yes, you can do something like this:
frame.setLocation( 500, 500 );


@ everyone else... new library is out...(0.98.1)
29 Nov 2009, 23:44 hansi, http://www.superduper.org @everyone:
minor bugfix for mac-version. please upgrade to 0.98.2 if possible!
11 Dec 2009, 11:37 Adam Hi Hansi

Usally I don't have problems when installing new libraries for Processing but your FullScreen API for Processing puzzles me a bit:

First of all Processing wants me to put the fullscreen library in my sketchbook/libraries/ folder... It is placed there...

Secondly I don't seem to have af fullscreen/library folder (?)

I have downloaded the fullscreen-src-0.98.2-package as I'm runing Processing in version 1.0.9...

Cheers
Adam
15 Dec 2009, 07:50 hansi, http://www.superduper.org @Adam:

If you downloaded the latest package from here you should have gotten a .zip file, when you extract it you should see a folder-structure like this:
fullscreen/examples
fullscreen/library
fullscreen/reference
etc.

just the _entire_ folder and move it to /libraries/

if you still have install-trouble just email me directly!
19 Jan 2010, 04:48 Killian Hi Hansi,

Does the Fullscreen library work with OPENGL renderer? I spent almost two hours on trying to get it working. No way!

Setting screen resolution to 800*600 works fine, but afterwards there's nothing but a damned black screen.

size(aWidth, aHeight, OPENGL);
fs = new FullScreen(this);
fs.enter();

Maybe the rendering handle is invalid after changing screen resolution!?


Any suggestions? :-)
Best regards, Killian
19 Jan 2010, 08:45 Hansi, http://www.superduper.org @Killian
Processing version, fullscreen version, operating system, error message... anything???
sorry i need to ask, but my magic skills are kinda low today...
19 Jan 2010, 19:06 Killian Sorry, my bad!

OS: windows vista sp2 64bit
processing: 1.0.7
fullscreen: 0.98

Actually there is no error message. Just a blank black screen.

Usually I code in c++ with opengl, sometimes in pascal & opengl where I always get a handle error when I try to change screen resolution or frame decoration after having initialized OpenGL.

So that's why I got the idea it might be the same problem with !?

Does this help you?
2 Feb 2010, 01:39 sami I'm getting "UnsupportedClassVersionError: A library is using code compiled with an unsupported version of Java"

help?
4 Feb 2010, 20:08 hansi @sami

my bad, i had exported for java6 and you are apparently on java5.
i re-uploaded it!
5 Mar 2010, 12:45 antoine Hi, just downloaded the lib, and still getting the UnsupportedClassVersionError error... (MacOSX)
Did you re-export to java 6 by any chance and by mistake ?
Thanks

This version of Processing only supports libraries and JAR files compiled for Java 1.5.
A library used by this sketch was compiled for Java 1.6 or later,
and needs to be recompiled to be compatible with Java 1.5.
Exception in thread "Animation Thread" java.lang.UnsupportedClassVersionError: Bad version number in .class file
5 Mar 2010, 13:34 antoine Me again,

The "fullscreen-0.98.3.zip" that appears under "all versions" works fine.

But the "fullscreen.zip" that gets downloaded when "Downloald me now !" or "Fullscreen.zip" is pressed does not : compiled under java6.

Thanks !
11 Mar 2010, 15:42 hansi, http://www.superduper.org @antoine

Thanks, glad you figured it out anyways.
Fixed now!

best, h,-
11 Mar 2010, 21:51 Will Is it possible to run one processing sketch fullscreen on one monitor and have another sketch be fullscreen on another monitor?









Warnings & Limitations

  • Only works for applications (not for applets)
  • This size of the sketch can not be scaled to screen size in fullscreen mode
  • Fonts are sometimes corrupted, use this as a workaround.
  • A list of bugs can be found here.

  • The ESC key exists the application, not fullscreen mode
  • It seems not every implementation of Java on Linux gives you proper fullscreen support, you might not be able to switch resolution
  • This package conflicts with processings "present" option

Thanks!

Thanks to github.com for providing a source repository and a big thanks to everybody who sent problems and suggestions to me!

Developers welcome!

If you're interrested in helping develop this api further or you wanna help testing new experimental versions please visit the github project page at http://github.com/kritzikratzi/fullscreen-p5/. You'll also find git access and a wiki there.

My Amazon.com Wish List hansi raber, www.superduper.org Last updated: Feb 05, 2010