Пример #1
0
 public DDSHeader(EndianBinaryReader reader)
 {
     Size              = reader.ReadUInt32(Endian.LittleEndian);
     Flags             = (DDSD)reader.ReadUInt32(Endian.LittleEndian);
     Height            = reader.ReadUInt32(Endian.LittleEndian);
     Width             = reader.ReadUInt32(Endian.LittleEndian);
     PitchOrLinearSize = reader.ReadUInt32(Endian.LittleEndian);
     Depth             = reader.ReadUInt32(Endian.LittleEndian);
     MipMapCount       = reader.ReadUInt32(Endian.LittleEndian);
     Reserved1         = new uint[11];
     for (int i = 0; i < Reserved1.Length; i++)
     {
         Reserved1[i] = reader.ReadUInt32(Endian.LittleEndian);
     }
     PixelFormat = new DDSPixelFormat(reader);
     Caps        = (DDSCaps)reader.ReadUInt32(Endian.LittleEndian);
     Caps2       = (DDSCaps2)reader.ReadUInt32(Endian.LittleEndian);
     Caps3       = reader.ReadUInt32(Endian.LittleEndian);
     Caps4       = reader.ReadUInt32(Endian.LittleEndian);
     Reserved2   = reader.ReadUInt32(Endian.LittleEndian);
 }
Пример #2
0
 private static bool CheckBitmasks(DDSPixelFormat pixelFormat, uint r, uint g, uint b, uint a)
 {
     return(pixelFormat.RBitMask == r && pixelFormat.GBitMask == g && pixelFormat.BBitMask == b && pixelFormat.ABitMask == a);
 }