From: Mikko Rasa Date: Sun, 17 Aug 2014 14:44:10 +0000 (+0300) Subject: Make the viewer capable of viewing scenes X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b760fa04a65deaceb4c793ba24ca4f4e01bdbc82;p=libs%2Fgl.git Make the viewer capable of viewing scenes --- diff --git a/tools/viewer.cpp b/tools/viewer.cpp index 3e12321f..d2a384f4 100644 --- a/tools/viewer.cpp +++ b/tools/viewer.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -144,9 +145,12 @@ Viewer::Viewer(int argc, char **argv): resources.add("__.object", object); } else if(ext==".object") + renderable = load(renderable_name); + else if(ext==".scene") { - object = load(renderable_name); - renderable = object; + GL::SimpleScene *scene = new GL::SimpleScene; + DataFile::load(*scene, renderable_name, resources); + renderable = scene; } else throw usage_error("Unknown renderable type");