properties.setDebugGL(true);
canvas = new CanvasFactory().createRealtimeCanvasWindow(800, 600);
// canvas = new CanvasFactory().createRealtimeCanvasFullscreen();
context = canvas;
imageFactory = canvas.getImageFactory();
canvas.addWindowListener(new WindowListener() {
public void windowActivated() {}
public void windowClosed() {}
public void windowClosing() {
finish = true;
}