Skip to content

Instantly share code, notes, and snippets.

@kritzikratzi
Created February 5, 2010 05:56
Show Gist options
  • Save kritzikratzi/295549 to your computer and use it in GitHub Desktop.
Save kritzikratzi/295549 to your computer and use it in GitHub Desktop.
import processing.opengl.*;
import fullscreen.*;
SoftFullScreen fs;
PFont font;
boolean reloadFont = false;
void setup(){
size( screen.width, screen.height, OPENGL );
frameRate(2000);
fs = new SoftFullScreen( this );
font = loadFont( "Serif-48.vlw" );
fs.enter();
}
void displayChanged(){
reloadFont = true;
}
void draw(){
background(0);
if( reloadFont ){
font = loadFont( "Serif-48.vlw" );
reloadFont = false;
}
fill( 255 );
textFont( font );
text( frameRate + "fps", 100, 100 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment