X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fsceneload.cc;h=ad6e61ec5b625c9a469bf545f25dbc4c7c48208b;hb=b30241a8a51be904b22459a1d0cc3322e0a505d9;hp=11ce1e1b0208b7773e5fa1afa1f16d90a2191ea0;hpb=84f1549d8146ac54574256ae0243747199e51151;p=laserbrain_demo diff --git a/src/sceneload.cc b/src/sceneload.cc index 11ce1e1..ad6e61e 100644 --- a/src/sceneload.cc +++ b/src/sceneload.cc @@ -17,6 +17,7 @@ #include "objmesh.h" #include "datamap.h" #include "logger.h" +#include "metascene.h" static bool load_material(Scene *scn, Material *mat, const aiMaterial *aimat); static SceneNode *load_node(Scene *scn, const aiScene *aiscn, unsigned int flags, const aiNode *ainode); @@ -201,7 +202,7 @@ static bool load_material(Scene *scn, Material *mat, const aiMaterial *aimat) int textype = assimp_textype(aitype); info_log("loading %s texture: %s\n", assimp_textypestr(aitype), fname); - Texture *tex = scn->texset->get_texture(fname, TEX_2D); + Texture *tex = scn->texset->get_texture(fname, TEX_2D, &scn->datamap); assert(tex); mat->textures.push_back(tex); @@ -381,7 +382,11 @@ bool SceneSet::load_scene(Scene *scn, const char *fname) bool SceneSet::done_scene(Scene *scn) { - return scn->load(0, SCNLOAD_STAGE_GL); + bool res = scn->load(0, SCNLOAD_STAGE_GL); + if(scn->metascn) { + scn->metascn->scene_loaded(scn); + } + return res; } void SceneSet::free_scene(Scene *scn)