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); }
private void ReleaseTexture() { // Release the detail map texture object. DetailTexture?.ShutDown(); DetailTexture = null; // Release the texture object. Texture?.ShutDown(); Texture = null; }