diff options
author | Treeki <treeki@gmail.com> | 2011-03-16 05:14:49 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-03-16 05:14:49 +0100 |
commit | b625da59b0bbe60a9380dbd00df1ae982e6b5a58 (patch) | |
tree | e2622b0c2e235a68ac3c4f8913117e158d3335bf /TestApp/Main.cs | |
parent | 51b0e39ceb5962ffd9b22f1b4722d2b243dba60f (diff) | |
download | nw4rtools-b625da59b0bbe60a9380dbd00df1ae982e6b5a58.tar.gz nw4rtools-b625da59b0bbe60a9380dbd00df1ae982e6b5a58.zip |
now uses 8-bit vertex data indexes where possible. quite a big optimisation!
Diffstat (limited to '')
-rw-r--r-- | TestApp/Main.cs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/TestApp/Main.cs b/TestApp/Main.cs index 56991bd..71b577b 100644 --- a/TestApp/Main.cs +++ b/TestApp/Main.cs @@ -17,7 +17,7 @@ namespace TestApp { // Going to create a model! //string filename = "crapmap", resmdlname = "CrapMap"; - string filename = "SMGoldwood"; + /*string filename = "SMGoldwood"; ResFile rf = new ResFile(); @@ -25,15 +25,25 @@ namespace TestApp { ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + "BrownTree.obj"), rf, "BrownTree", ObjImporter.LightmapType.MapObj); ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + "RedTree.obj"), rf, "RedTree", ObjImporter.LightmapType.MapObj); - File.WriteAllBytes(mdlPath + "SMGoldwood.brres", BrresWriter.WriteFile(rf)); + File.WriteAllBytes(mdlPath + "SMGoldwood.brres", BrresWriter.WriteFile(rf));*/ - /*ResFile rf2 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + filename + ".brres")); + string filename = "MMFullWorld"; + string resmdlname = "WorldBase"; + + ResFile rf = new ResFile(); + + ObjImporter.ImportModel(mdlPath, File.OpenText(mdlPath + "fullworld-Z6-fail.obj"), rf, resmdlname, ObjImporter.LightmapType.Map); + + File.WriteAllBytes(mdlPath + filename + ".brres", BrresWriter.WriteFile(rf)); + + ResFile rf2 = BrresReader.LoadFile(File.ReadAllBytes(mdlPath + filename + ".brres")); using (var gw = new RenderWindow()) { gw.Title = filename; gw.SetModel(rf2, resmdlname); gw.Run(1, 1); - }*/ + } + //*/ |