From 3674b7a5b534224cc22551673a9d0ae9b83206c4 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Wed, 17 May 2017 03:52:19 +0300 Subject: [PATCH] load exhibits fails because loading is async --- Makefile | 2 +- src/app.cc | 3 +++ src/scene.cc | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3024ee3..ae16e3e 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ obj = $(src:.cc=.o) $(csrc:.c=.o) dep = $(obj:.o=.d) bin = demo -opt = -O3 -ffast-math +#opt = -O3 -ffast-math dbg = -g incpath = -Isrc -Isrc/machine -I/usr/local/include `pkg-config --cflags sdl2` diff --git a/src/app.cc b/src/app.cc index bc3f13c..60affa0 100644 --- a/src/app.cc +++ b/src/app.cc @@ -122,6 +122,9 @@ bool app_init(int argc, char **argv) cam_theta = rad_to_deg(acos(dot(dir, Vec3(0, 0, 1)))); exman = new ExhibitManager; + if(!exman->load(mscn, "data/exhibits")) { + return false; + } blobs = new BlobExhibit; blobs->node = new SceneNode; diff --git a/src/scene.cc b/src/scene.cc index 484310f..adc90fb 100644 --- a/src/scene.cc +++ b/src/scene.cc @@ -202,6 +202,7 @@ static SceneNode *find_node_rec(SceneNode *tree, const std::regex &re) if(std::regex_match(tree->get_name(), re)) { return tree; } + debug_log("no match: \"%s\"\n", tree->get_name()); int num = tree->get_num_children(); for(int i=0; i