From b0760b28807b31cc1403584265c07feb87ac4887 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 18 Feb 2011 03:28:31 +0100 Subject: some collada work, and an unfinished OGL renderer using OpenTK. huge commit --- TestApp/Main.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'TestApp/Main.cs') 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("Textures(NW4R)"); + using (var gw = new RenderWindow()) { + gw.Title = mdlName; + gw.SetModel(rf, mdlName); + gw.Run(1, 1); + } + + + + /*var texs = rf.GetGroup("Textures(NW4R)"); // wtf C#?! foreach (var kv in (IEnumerable>)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();*/ } } } -- cgit v1.2.3