I've been looking through the fullscreen discussions in the hopes of creating a fullscreen processing application to be run as a windows screen saver. All screen saver nonsense aside... I have created this code:
Code:import processing.opengl.*;
public class screensaver2 extends PApplet{
float roty = 0.0;
float rotx = 0.0;
float rotyspeed = random(0,0.5);
float rotxspeed = random(0,0.5);
static public void main(String args[]) {
PApplet.main(new String[] { "--display=1", "--present", "screensaver2" });
}
void setup(){
Dimension scr = Toolkit.getDefaultToolkit().getScreenSize();
size(scr.width,scr.height,OPENGL);
stroke(255);
noFill();
}
void draw(){
background(0);
translate(width/2, height/2);
rotateY(radians(roty));
rotateX(radians(rotx));
roty += rotyspeed;
rotx += rotxspeed;
box(height/2);
}
void keyPressed(){
exit();
}
}
...which basically gets the dimensions of the screen and changes the width and height of the stage to those of the screen.
After being exported to an EXE, it does open fullscreen, but doesn't seem to run the draw() loop. And after I attempt to run it, every other attempt to run an opengl application afterward (processing, python, second life) results in failure until I restart the computer.
I'm so close to success, I can taste it. I'm running windows xp with processing 1.11.