/// <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(); }
/// <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(); }