Exemple #1
0
        private bool LoadTextures(SharpDX.Direct3D11.Device device, string colorTextureFilename, string normalMapFilename)
        {
            colorTextureFilename = DSystemConfiguration.DataFilePath + colorTextureFilename;
            normalMapFilename    = DSystemConfiguration.DataFilePath + normalMapFilename;

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

            // Initialize the color texture object.
            if (!ColorTexture.Initialize(device, colorTextureFilename))
            {
                return(false);
            }

            // Create the normal map texture object.
            NormalMapTexture = new DTexture();

            // Initialize the normal map texture object.
            if (!NormalMapTexture.Initialize(device, normalMapFilename))
            {
                return(false);
            }

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