コード例 #1
0
        private bool LoadTextures(SharpDX.Direct3D11.Device device, string textureFileName, string detailMapFilename)
        {
            textureFileName   = DSystemConfiguration.DataFilePath + textureFileName;
            detailMapFilename = DSystemConfiguration.DataFilePath + detailMapFilename;

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

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

            // Create the detail map texture object.
            DetailTexture = new DTexture();

            // Initialize the detail map texture object.
            if (!DetailTexture.Initialize(device, detailMapFilename))
            {
                return(false);
            }

            return(true);
        }
コード例 #2
0
 private void ReleaseTexture()
 {
     // Release the detail map texture object.
     DetailTexture?.ShutDown();
     DetailTexture = null;
     // Release the texture object.
     Texture?.ShutDown();
     Texture = null;
 }