Ejemplo n.º 1
0
 public static void ExportKXTHeader(Stream destination, KTXContainerParameters @params)
 {
     using (BinaryWriter binWriter = new BinaryWriter(destination, Encoding.UTF8, true))
     {
         binWriter.Write(Identifier);
         binWriter.Write(EndianessLE);
         binWriter.Write((uint)Type);
         binWriter.Write(TypeSize);
         binWriter.Write((uint)Format);
         binWriter.Write((uint)@params.InternalFormat);
         binWriter.Write((uint)@params.BaseInternalFormat);
         binWriter.Write(@params.Width);
         binWriter.Write(@params.Height);
         binWriter.Write(PixelDepth);
         binWriter.Write(NumberOfArrayElements);
         binWriter.Write(NumberOfFaces);
         binWriter.Write(NumberOfMipmapLevels);
         binWriter.Write(BytesOfKeyValueData);
         binWriter.Write(@params.DataLength);
     }
 }
Ejemplo n.º 2
0
 public static void ExportKXT(Stream destination, Stream source, KTXContainerParameters @params)
 {
     ExportKXTHeader(destination, @params);
     source.CopyStream(destination, @params.DataLength);
 }