summaryrefslogtreecommitdiff
path: root/TestApp/Main.cs
diff options
context:
space:
mode:
Diffstat (limited to 'TestApp/Main.cs')
-rw-r--r--TestApp/Main.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/TestApp/Main.cs b/TestApp/Main.cs
index 3eb49a4..447f556 100644
--- a/TestApp/Main.cs
+++ b/TestApp/Main.cs
@@ -2,6 +2,9 @@ using System;
using System.IO;
using System.Collections.Generic;
using NW4RTools;
+using OpenTK;
+using OpenTK.Graphics;
+using OpenTK.Graphics.OpenGL;
namespace TestApp {
class MainClass {
@@ -10,13 +13,22 @@ namespace TestApp {
string mdlName = "CS_W1";
//string mdlName = "bgB_4502";
+ //string mdlName = "cobKoopaCastle";
string whatever = (mdlName == "CS_W2" || mdlName == "CS_W3" || mdlName == "CS_W6") ? "a" : "";
byte[] file = File.ReadAllBytes(mdlPath + mdlName + ".brres");
ResFile rf = BrresReader.LoadFile(file);
- var texs = rf.GetGroup<Texture>("Textures(NW4R)");
+ using (var gw = new RenderWindow()) {
+ gw.Title = mdlName;
+ gw.SetModel(rf, mdlName);
+ gw.Run(1, 1);
+ }
+
+
+
+ /*var texs = rf.GetGroup<Texture>("Textures(NW4R)");
// wtf C#?!
foreach (var kv in (IEnumerable<KeyValuePair<string,Texture>>)texs) {
kv.Value.BaseImage.Save(mdlPath + "images/" + kv.Key + ".png");
@@ -27,7 +39,7 @@ namespace TestApp {
//var sw = new StreamWriter(objFile);
//ObjWriter.WriteModel(sw, rf, mdlName);
ColladaWriter.WriteModel(objFile, rf, mdlName + whatever);
- objFile.Close();
+ objFile.Close();*/
}
}
}