X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fapp.cc;h=bc3f13c55ebb27cf52e3fcf998f6b25afd29a300;hp=1cf21bd27914dde7cf159c05b20566aa046510a8;hb=35c329e4b66fc60622080be1b9ff30148a7e74e4;hpb=14fd44f4dfec922dae20ccf1225bd1fdb5864ab9 diff --git a/src/app.cc b/src/app.cc index 1cf21bd..bc3f13c 100644 --- a/src/app.cc +++ b/src/app.cc @@ -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;