summaryrefslogtreecommitdiff
path: root/TestApp/Main.cs
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-02-18 03:28:31 +0100
committerTreeki <treeki@gmail.com>2011-02-18 03:28:31 +0100
commitb0760b28807b31cc1403584265c07feb87ac4887 (patch)
treedc97346a0c0d0cdcdc066d77df3905a614a858e8 /TestApp/Main.cs
parent7d7491feb41bc9724bf63bef545b996226406889 (diff)
downloadnw4rtools-b0760b28807b31cc1403584265c07feb87ac4887.tar.gz
nw4rtools-b0760b28807b31cc1403584265c07feb87ac4887.zip
some collada work, and an unfinished OGL renderer using OpenTK. huge commit
Diffstat (limited to '')
-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();*/
}
}
}