exhibit manager progress
[laserbrain_demo] / src / app.cc
index 1cf21bd..bc3f13c 100644 (file)
@@ -14,6 +14,7 @@
 #include "opt.h"
 #include "post.h"
 #include "renderer.h"
+#include "exman.h"
 #include "blob_exhibit.h"
 
 #define NEAR_CLIP      5.0
@@ -61,6 +62,7 @@ static unsigned int sdr_post_gamma;
 
 static long prev_msec;
 
+static ExhibitManager *exman;
 static BlobExhibit *blobs;
 static bool show_blobs;
 
@@ -119,6 +121,8 @@ bool app_init(int argc, char **argv)
        dir.y = 0;
        cam_theta = rad_to_deg(acos(dot(dir, Vec3(0, 0, 1))));
 
+       exman = new ExhibitManager;
+
        blobs = new BlobExhibit;
        blobs->node = new SceneNode;
        blobs->init();
@@ -126,6 +130,8 @@ bool app_init(int argc, char **argv)
        blobs->node->set_scaling(Vec3(28, 28, 28));
        blobs->node->update(0);
 
+       exman->add(blobs);
+
        if(!(sdr_ltmap_notex = create_program_load("sdr/lightmap.v.glsl", "sdr/lightmap-notex.p.glsl"))) {
                return false;
        }
@@ -162,9 +168,7 @@ void app_cleanup()
 
        delete rend;
 
-       blobs->destroy();
-       delete blobs->node;
-       delete blobs;
+       delete exman;
 
        texman.clear();
        sceneman.clear();
@@ -194,9 +198,7 @@ static void update(float dt)
        sceneman.update();
 
        mscn->update(dt);
-       if(show_blobs) {
-               blobs->update(dt);
-       }
+       exman->update(dt);
 
        float speed = walk_speed * dt;
        Vec3 dir;