From b760fa04a65deaceb4c793ba24ca4f4e01bdbc82 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 17 Aug 2014 17:44:10 +0300 Subject: [PATCH] Make the viewer capable of viewing scenes --- tools/viewer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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"); -- 2.45.2