/**
 * package containing the main class (applications entry point)
 */
package simogl.main;

import simogl.gui.ControlsDialog;
import simogl.gui.MainFrame;

/**
 * This is the entry point of the JOGL application
 * @author Frank Bruns
 *
 */
public class Main
{	
	/**
	 * The application's main()-method.
	 * @param args argument string, not used so far
	 */
	public static void main(String[] args)
	{		
		MainFrame main = new MainFrame("Frank Bruns' Project: SimoGL");
		//MainFrame main = new MainFrame("Frank Bruns' Project: SimoGL",1024,768,16);	
		main.setVisible(true);			
		
		// start animator and give focus to the canvas in order to make
		// KeyEvents work
		main.getAnimator().start();
		main.getGLCanvas().requestFocus();
		
		// show controls dialog and center it on the screen
		ControlsDialog dialog = new ControlsDialog(main);
		dialog.setLocation((main.getWidth()/2)-dialog.getWidth()/2, 
				(main.getHeight()/2)-dialog.getHeight()/2);		
		dialog.setVisible(true);
	}
}
