source: OniSplit/Imaging/DdsWriter.cs

Last change on this file was 1114, checked in by iritscen, 5 years ago

Adding OniSplit source code (v0.9.99.0). Many thanks to Neo for all his work over the years.

File size: 590 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.IO;
4
5namespace Oni.Imaging
6{
7 internal class DdsWriter
8 {
9 public static void Write(IList<Surface> surfaces, string filePath)
10 {
11 using (var stream = File.Create(filePath))
12 using (var writer = new BinaryWriter(stream))
13 {
14 var header = DdsHeader.Create(surfaces);
15
16 header.Write(writer);
17
18 foreach (var surface in surfaces)
19 writer.Write(surface.Data);
20 }
21 }
22 }
23}
Note: See TracBrowser for help on using the repository browser.