private void ExportTexture(string fileName, Texture tex)
 {
     IrrlichtLime.Video.Image img = null;
     if (IrrlichtLime.Video.Image.IsCompressedFormat(tex.ColorFormat))
     {
         img = driver.CreateUncompressedImage(tex);
     }
     else
     {
         img = driver.CreateImage(tex);
     }
     driver.WriteImage(img, fileName);
     img.Drop();
 }