Exemplo n.º 1
0
		public Display( VoxelGameEnvironment game )
		{
			Exit = CannotExit;
			this.game = game;
			//string versionOpenGL = GL.GetString(StringName.Version);
			//GL.Get
			//display_width = Width;// = Settings.Read( "GL.Width", System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width );
			//display_height = Height;// = Settings.Read( "GL.Height", System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height );
			//mouse_x = display_width / 2;
			//mouse_y = display_height / 2;
			Width = 1080;
			Height = 1920;
#if !USE_GLES2
			System.Windows.Forms.Cursor.Position = new Point( display_x + ( display_width ) / 2, display_y + display_height / 2 );
#endif

			//GL.Viewport( 0, 0, Width, Height );
#if !USE_GLES2
			GL.Enable( EnableCap.Multisample );
#endif
			Matrix4.CreatePerspectiveFieldOfView( (float)( System.Math.PI / 2 ), (float)Width / (float)Height, 0.01f, 10000, out projection );
			//projection = Matrix4.Identity;

			// generic fly camera not attached to any object
			free_camera = new Voxels.UI.Camera();
			active_camera = free_camera; // default to freecam;
			free_camera.MoveTo( 0, 4, 0 );
			free_camera.MoveTo( 1799, 4, 0 );
			debug_cube_transform = btTransform.Identity;

		}
Exemplo n.º 2
0
		void SetCamera( Camera Camera )
		{
			this.Camera = Camera;
		}