private void ReleaseTexture() { // Release the texture object. if (Texture != null) { Texture.Shutdown(); Texture = null; } }
private bool LoadTexture(Device device, string textureFileName) { textureFileName = SystemConfiguration.DataFilePath + textureFileName; // Create new texture object. Texture = new Texture(); // Initialize the texture object. if (!Texture.Initialize(device, textureFileName)) return false; return true; }