Пример #1
0
        private void Dispose(bool isDisposing)
        {
            if (!m_isDisposed)
            {
                if (isDisposing)
                {
                    DDSTypes.DisposeMipChains(m_mipChains);
                }

                m_isDisposed = true;
            }
        }
Пример #2
0
 /// <summary>
 /// Writes images to a DDS file to disk.
 /// </summary>
 /// <param name="fileName">File to write to. If it doesn't exist, it will be created.</param>
 /// <param name="flags">Flags to control how the DDS data is saved.</param>
 /// <returns>True if writing the data was successful, false if otherwise.</returns>
 public bool Write(String fileName, DDSFlags flags = DDSFlags.None)
 {
     return(DDSTypes.Write(fileName, m_mipChains, m_format, m_dimension, flags));
 }
Пример #3
0
 /// <summary>
 /// Writes images contained as DDS formatted data to a stream.
 /// </summary>
 /// <param name="output">Output stream.</param>
 /// <param name="flags">Flags to control how the DDS data is saved.</param>
 /// <returns>True if writing the data was successful, false if otherwise.</returns>
 public bool Write(Stream output, DDSFlags flags = DDSFlags.None)
 {
     return(DDSTypes.Write(output, m_mipChains, m_format, m_dimension, flags));
 }
Пример #4
0
 /// <summary>
 /// Validates the contained mipmap surfaces, e.g. all array main images must be the same dimensions and have the same number of mipmaps, cubemaps must have 6 faces, data/sizes must at least be in valid ranges, etc.
 /// </summary>
 /// <returns>True if the image data is not correctly initialized, false if it passes some basic checks.</returns>
 public bool Validate()
 {
     return(DDSTypes.ValidateInternal(m_mipChains, m_format, m_dimension));
 }