public boolean UpdateWindow()
	{
		try
		{
			DisplayMode dm = null;
			DisplayMode[] dms = Display.getAvailableDisplayModes();
			
			for (int i = 0; i < dms.length; i++)
			{				
				if (dms[i].getWidth() == mWindowWidth
					&& dms[i].getHeight() == mWindowHeight)
				{
					dm = dms[i];
					break;
				}
			}
			
			if (dm == null)
			{
				dm = new DisplayMode(mWindowWidth, mWindowHeight);
				Display.setDisplayMode(dm);
			}
			else
			{				
				Display.setDisplayMode(dm);
				Display.setFullscreen(mIsFullscreen);
				Display.setVSyncEnabled(mIsFullscreen);
			}
			
			if (!Display.isCreated())
			{
				Display.create();
			}
			
			glMatrixMode(GL_PROJECTION);
			glLoadIdentity();
			glOrtho(0, mWindowWidth, mWindowHeight, 0, -1, 1);
		}
		catch(Exception e)
		{
			e.printStackTrace();
			return false;
		}
		return true;
	}