private void ReleaseTextures()
 {
     // Release the texture objects.
     CloudTexture?.ShutDown();
     CloudTexture = null;
     PerturbTexture?.ShutDown();
     PerturbTexture = null;
 }
        private bool LoadTexture(SharpDX.Direct3D11.Device device, string textureFileName)
        {
            textureFileName = DSystemConfiguration.DataFilePath + textureFileName;

            // Create the texture object.
            Texture = new DTexture();

            // Initialize the texture object.
            if (!Texture.Initialize(device, textureFileName))
                return false;

            return true;
        }
        private bool LoadTextures(SharpDX.Direct3D11.Device device, string cloudTextureFilename, string perturbTextureFilename)
        {
            // Create the cloud texture object.
            CloudTexture = new DTexture();

            // Initialize the cloud texture object.
            if (!CloudTexture.Initialize(device, DSystemConfiguration.DataFilePath + cloudTextureFilename))
            {
                return(false);
            }

            // Create the perturb texture object.
            PerturbTexture = new DTexture();

            // Initialize the perturb texture object.
            if (!PerturbTexture.Initialize(device, DSystemConfiguration.DataFilePath + perturbTextureFilename))
            {
                return(false);
            }

            return(true);
        }