Revision: | 1114 |
Committed: | Wed Jan 22 14:08:57 2020 UTC (5 years, 8 months ago) by iritscen |
File size: | 590 byte(s) |
Log Message: | Adding OniSplit source code (v0.9.99.0). Many thanks to Neo for all his work over the years. |
# | Content |
---|---|
1 | using System; |
2 | using System.Collections.Generic; |
3 | using System.IO; |
4 | |
5 | namespace 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 | } |