Esempio n. 1
0
		protected override void OnLoad( EventArgs e )
		{
			// called upon app init
			GL.ClearColor( Color.Black );
			GL.Enable( EnableCap.Texture2D );
			GL.Hint( HintTarget.PerspectiveCorrectionHint, HintMode.Nicest );
			Width = 800;
			Height = 480;
			game = new Game();
			game.screen = new Surface( Width, Height );
			Sprite.target = game.screen;
			screenID = game.screen.GenTexture();
			game.Init( runningTime, useGPU, gpuPlatform );
		}
Esempio n. 2
0
        protected override void OnLoad(EventArgs e)
        {
            // called upon app init
            GL.ClearColor(System.Drawing.Color.Black);
            GL.Enable(EnableCap.Texture2D);
            GL.Disable(EnableCap.DepthTest);
            GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Nicest);
            ClientSize = new Size(1024, 512);
            game = new Game();
            game.screen = new Surface(Width, Height);
            Sprite.target = game.screen;
            screenID = game.screen.GenTexture();

            //Event listener for the mouse.
            System.Windows.Forms.Cursor.Position = new Point(Bounds.Left + Bounds.Width / 2, Bounds.Top + Bounds.Height / 2);

            MouseMove += new EventHandler<MouseMoveEventArgs>(OnMouseMove);

            game.Init(Bounds);
        }