public TestState()
        {
            var t = new TerrainGen();
            var sw = new Stopwatch();
            sw.Start();

            //t.GenerateChunk(i, 0);

            sw.Stop();
            double d = sw.ElapsedMilliseconds / 500d;
            int g = 5;

            target = new RenderTarget();
            //sprite = new Sprite2D(target, "TestTexture", 0, 0, 50, 50);
            var buttongen = new ButtonGenerator("ToolbarButton64.json");
            buttongen.RenderTarget = target;
            buttongen.TextureName = "UI_TestTexture";
            buttongen.X = 0;
            buttongen.Y = 0;
            button = buttongen.GenerateButton();

            buttongen.X = 64;
            buttongen.Y = 0;
            button1 = buttongen.GenerateButton();
        }
        public TerrainManager(GamestateManager mgr)
        {
            _loadedChunks = new List<TerrainChunk>();
            _manager = mgr;
            _generator = new TerrainGen();
            var chunk = _generator.GenerateChunk(new XZPair(0, 0));
            chunk.SetBufferData();
            _loadedChunks.Add(chunk);

            _renderTarget = new RenderTarget(0.0f);
        }
        public PlayerState(GamestateManager mgr, Point viewportSize)
        {
            _renderTarget = new RenderTarget(0f);
            _manager = mgr;
            _viewportSize = viewportSize;
            _playerPosition = new Vector3(348, 1705, -192);
            _playerLookDir = new Angle3(-1.2f, 0, -10.004f);//xxxxx this value gets ~2 added to it somehow
            _manager.AddSharedData(SharedStateData.PlayerPosition, _playerPosition);
            _manager.AddSharedData(SharedStateData.PlayerLook, _playerLookDir);
            _skipNextMouseUpdate = false;

            _x = new Text2D(_renderTarget, 0, 0, "hi");
            _y = new Text2D(_renderTarget, 0, 10, "hi");
            _z = new Text2D(_renderTarget, 0, 20, "hi");
            _pitch = new Text2D(_renderTarget, 0, 30, "hi");
            _yaw = new Text2D(_renderTarget, 0, 40, "hi");
            _x.Color = Color.Wheat;
            _y.Color = Color.Wheat;
            _z.Color = Color.Wheat;
            _pitch.Color = Color.Wheat;
            _yaw.Color = Color.Wheat;
        }