TagTool.Common.DdsHeader.WriteTo C# (CSharp) Method

WriteTo() public method

Writes the DDS header to a stream. On return, the stream will be positioned where the texture data should go.
Thrown if an error occurs while saving.
public WriteTo ( Stream stream ) : void
stream Stream The stream to write to.
return void
        public void WriteTo(Stream stream)
        {
            var writer = new BinaryWriter(stream);
            writer.Write(DdsFourCc.FromString("DDS "));
            WriteDdsHeader(writer);
            if (D3D10Format != DxgiFormat.Unknown)
                WriteDdsD3D10Header(writer);
        }