Exemplo n.º 1
0
        /// <summary>
        /// Clear all stored data for this drawTerrain, getting rid of all textures and other loaded things.
        /// </summary>
        public void Clear()
        {
            textureManager?.Dispose();
            loadedTerrainTiles.Clear();
            terrainTiles.Clear();

            textureManager = new TerrainTextureManager(terrtexPath, device, messageDelegate);
            SetTerrainReduction();
            DiscardVertexBuffers();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Clear all stored data for this drawTerrain, getting rid of all textures and other loaded things.
        /// </summary>
        public void Clear()
        {
            vertexDeclaration?.Dispose();
            textureManager?.Dispose();
            loadedTerrainTiles.Clear();
            terrainTiles.Clear();

            vertexDeclaration = new VertexDeclaration(device, VertexPositionTexture.VertexElements);
            textureManager    = new TerrainTextureManager(terrtexPath, device, messageDelegate);
            SetTerrainReduction();
            DiscardVertexBuffers();
        }