Exemple #1
0
        /**
         * Update the the linked chunk based on the the data.
         **/
        public void UpdateChunk()
        {
            wasRendered = true;

            MeshData meshData = new MeshData();

            for (int x = 0; x < chunkSize; x++)
            {
                for (int y = 0; y < chunkSize; y++)
                {
                    for (int z = 0; z < chunkSize; z++)
                    {
                        meshData = Register.GetBlockById(blocks[x, y, z]).GetBlockMesh(this, x, y, z, meshData);
                    }
                }
            }

            renderer.RenderMesh(meshData);
        }