static void UpdateTexture()
 {
     //  This texture should be in DDS file extension and must be DXT1 compressed (use Photoshop and DDS tool from NVIDIA)
     //  We don't use for it dxt compression from XNA's content processor because we don't want huge (over 100 Mb) files in SVN.
     if (string.IsNullOrEmpty(Filename))
     {
         m_textureCube = null;
     }
     else
     {
         m_textureCube = MyTextureManager.GetTexture <MyTextureCube>(Filename, "", null, LoadingMode.Immediate);
     }
 }
        public static void UnloadContent()
        {
            MyMwcLog.WriteLine("MyBackgroundCube.UnloadContent - START");
            MyMwcLog.IncreaseIndent();

            if (m_boxVertexBuffer != null)
            {
                m_boxVertexBuffer.Dispose();
                m_boxVertexBuffer = null;
            }

            if (m_textureCube != null)
            {
                MyTextureManager.UnloadTexture(m_textureCube);
                m_textureCube = null;
            }
            m_textureCube = null;
            m_loaded      = false;

            MyMwcLog.DecreaseIndent();
            MyMwcLog.WriteLine("MyBackgroundCube.UnloadContent - END");
        }
 static void UpdateTexture()
 {
     //  This texture should be in DDS file extension and must be DXT1 compressed (use Photoshop and DDS tool from NVIDIA)
     //  We don't use for it dxt compression from XNA's content processor because we don't want huge (over 100 Mb) files in SVN.
     m_textureCube = MyTextureManager.GetTexture <MyTextureCube>("Textures\\BackgroundCube\\Final\\" + GetFilename(), null, LoadingMode.Immediate);
 }
Exemple #4
0
 public static double GetTextureSizeInMb(MyTextureCube texture)
 {
     return(6 * CalculateTextureSizeInMb(texture.Format, texture.Size, texture.Size, texture.LevelCount));
 }