public ChunkOptimized(int width, int height, int depth, Vector3 translation)
        {
            Instancing = new HardwareInstancedRenderer(Global.GlobalShares.GlobalDevice, Global.GlobalShares.GlobalContent);
            Instancing.BindTexture(Global.GlobalShares.GlobalContent.Load <Texture2D>(@"Textures\SeamlessStone"), Core.MapGenerator.GlobalShares.Stone / 2);
            Instancing.BindTexture(Global.GlobalShares.GlobalContent.Load <Texture2D>(@"Textures\GrassTexture"), Core.MapGenerator.GlobalShares.Grass / 2);
            Instancing.BindTexture(Global.GlobalShares.GlobalContent.Load <Texture2D>(@"Textures\DirtSmooth"), Core.MapGenerator.GlobalShares.Dirt / 2);
            Instancing.BindTexture(Global.GlobalShares.GlobalContent.Load <Texture2D>(@"Textures\Water"), Core.MapGenerator.GlobalShares.Water / 2);

            Width  = width;
            Height = height;
            Depth  = depth;

            Translation = translation;

            ChunkArea = new BoundingBox(new Vector3(Translation.X, 0, Translation.Z), new Vector3(Translation.X + Width, Translation.Y + Height, Translation.Z + Depth));
            ChunkData = new DefaultCubeStructure[Width * Height * Depth];

            RenderingCubes = new List <int>();
            UpdatingCube   = new List <int>();
        }
 public void Push(int index, DefaultCubeStructure data)
 {
     ChunkData[index] = data;
 }