diff Renderer/Engine/viewer.cc @ 511:997490a061ee

fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 12 Oct 2009 17:46:20 +0900
parents 97e1b0346597
children 2659376067e8
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc	Mon Oct 12 15:48:40 2009 +0900
+++ b/Renderer/Engine/viewer.cc	Mon Oct 12 17:46:20 2009 +0900
@@ -10,6 +10,7 @@
 #include "TaskManager.h"
 #include <wchar.h>
 #include "Pad.h"
+#include "Application.h"
 
 static void post2runLoop(void *viewer);
 static void post2runDraw(void *viewer);
@@ -90,6 +91,23 @@
     SDL_GL_SwapBuffers();
 }
 
+void 
+Viewer::createFromXMLfile(const char *file) 
+{
+    sgroot->createFromXMLfile(manager, file);
+}
+
+SceneGraph *
+Viewer::createSceneGraph(int id)
+{
+    return sgroot->createSceneGraph(id);
+}
+
+void
+Viewer::setSceneData(SceneGraph *g)
+{
+    sgroot->setSceneData(g);
+}
 
 void
 Viewer::run_init(TaskManager *manager, Application *app)
@@ -102,9 +120,9 @@
 
     sgroot = new SceneGraphRoot(this->width, this->height);
 
-    app->init(this, this->width, this->height);
+    MainLoop *mainloop = app->init(this, this->width, this->height);
 
-    mainLoop();
+    mainloop->mainLoop();
 }